Skip to content

feat: add OrgManager user support to acceptance test framework - #1266

Merged
bonzofenix merged 9 commits into
mainfrom
split/acceptance-orgmanager
Jun 25, 2026
Merged

feat: add OrgManager user support to acceptance test framework#1266
bonzofenix merged 9 commits into
mainfrom
split/acceptance-orgmanager

Conversation

@bonzofenix

@bonzofenix bonzofenix commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces org-manager user concept to acceptance tests, enabling tests to run with limited permissions (OrgManager instead of admin).

Changes

  • acceptance/config/config.go: Add OrgManager user config fields
  • acceptance/helpers/cleanup.go: Per-node teardown to prevent space deletion races
  • acceptance/helpers/org.go: Org helper for shared org environments
  • acceptance/api/api_test.go: Accept 403 in deletePolicy for org-manager
  • acceptance/broker/broker_test.go: Adapt broker tests for org-manager
  • acceptance/assets/app/go_app/internal/app/disk_test.go: Disk write timing assertion

Testing

  • Tests updated to handle OrgManager permission boundaries
  • Per-node teardown prevents parallel test races

Part 2 of 4 — Split from #1149 for easier review.

  1. feat: add OAuth2 password grant support for event generator log-cache access #1265 — OAuth2 password grant (code)
  2. This PR — Acceptance test OrgManager support (test framework)
  3. feat: support shared org and space-scoped broker for PR deployments #1267 — Deployment scripts: shared org + space-scoped broker
  4. ci: wire shared org deployment into CI/CD workflows #1268 — CI/CD workflows wiring

- Add org-manager user configuration to acceptance test config
- Per-node teardown in AfterSuite to prevent space deletion races
- Accept 403 status in deletePolicy for org-manager users
- Add disk write timing test assertion
- Update cleanup helpers for shared org environments
- Fix broken Makefile echo referencing deleted variable
- Use DeferCleanup for occupier.Stop to prevent goroutine leak on assertion failure
- Fix CleanupInExistingOrg to resolve GUID per-space (was reusing space[0] GUID for all spaces)
- Remove dead UseExistingOrganization guard inside CleanupInExistingOrg (caller already branches)
- Add Bool() method on BoolOrInt; use it in isUpdatable()
@bonzofenix bonzofenix self-assigned this Jun 17, 2026
Comment thread acceptance/README.md
Comment thread acceptance/README.md
Comment thread acceptance/Makefile
@bonzofenix
bonzofenix requested a review from asalan316 June 24, 2026 13:47
Comment thread acceptance/helpers/spaces.go Outdated
Comment thread acceptance/helpers/cleanup.go Outdated
- Add Expect(Exit(0)) assertion in getSpaceGuidByName to fail fast on
  CF command errors instead of silently returning empty string
- Rename spaceGuidByte -> spaceGuidCmd to match the Session type
- Fix race condition in CleanupInExistingOrg: use GetRawSpaces to
  resolve name+GUID atomically, eliminating separate getSpaceGuidByName
  call that could fail when parallel Ginkgo nodes delete spaces concurrently
- GetTestSpaces now delegates to filterTestSpaces instead of duplicating
  the HasPrefix loop
- BoolOrInt.UnmarshalJSON checks first byte to branch on bool vs int,
  avoiding a failed json.Unmarshal attempt on every non-bool value
@bonzofenix
bonzofenix requested a review from asalan316 June 25, 2026 09:40
@bonzofenix
bonzofenix enabled auto-merge (squash) June 25, 2026 09:42
@bonzofenix
bonzofenix merged commit 5865a11 into main Jun 25, 2026
30 of 36 checks passed
@bonzofenix
bonzofenix deleted the split/acceptance-orgmanager branch June 25, 2026 17:18
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants