Skip to content

QA-2279: add OrganizationEventScene to the seeder - #8175

Merged
awiester-bw merged 3 commits into
mainfrom
qa-2279-organization-event-scene
Aug 11, 2026
Merged

QA-2279: add OrganizationEventScene to the seeder#8175
awiester-bw merged 3 commits into
mainfrom
qa-2279-organization-event-scene

Conversation

@awiester-bw

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/QA-2279

📔 Objective

The SeederApi can create organizations, members, collections, and groups, but has no way to create audit events. This blocks per-test seeding for the Events Public API test class, whose positive cases read events back from GET /public/events and need an org that already has some. This adds OrganizationEventScene, mirroring OrganizationGroupScene: it resolves the org, then writes Count audit-event rows (default 2) for it through IEventRepository, returning how many were seeded. The reflection-based scene registration picks it up automatically by class name.

It targets the self-host SQL event store ([dbo].[Event]), which is what qa-automation runs, and GET /public/events reads that same store there. The cloud Table Storage path (which needs EventTableEntity indexing) is out of scope and noted on the ticket. Verified by a passing build (0 warnings, warnings-as-errors on), dotnet format --verify-no-changes, and the pr-review-toolkit agent pass. No scene has a dedicated test harness in this repo (sibling scenes are untested), so no unit test was added, consistent with precedent.

@awiester-bw awiester-bw added the t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels label Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.41%. Comparing base (1581b9b) to head (3eded26).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8175   +/-   ##
=======================================
  Coverage   63.41%   63.41%           
=======================================
  Files        2339     2339           
  Lines      101533   101533           
  Branches     9179     9179           
=======================================
  Hits        64384    64384           
  Misses      34935    34935           
  Partials     2214     2214           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theMickster theMickster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple items comments for consideration; not necessarily must fix items at this point.

Comment thread util/Seeder/Factories/EventSeeder.cs Outdated
Comment thread util/Seeder/Scenes/OrganizationEventScene.cs

@theMickster theMickster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with these changes.
Heads up @MGibson1 that we have a new scene incoming. I had Andrew add an upper boundary/guard/validation on the max number of events to create to keep the scene focused as we're preferring. Hope that's alright with you that we're making a set of mock events this way.

@awiester-bw
awiester-bw merged commit ef0a8e9 into main Aug 11, 2026
43 checks passed
@awiester-bw
awiester-bw deleted the qa-2279-organization-event-scene branch August 11, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants