test(32.2-05): unit tests for administrator MCP grants, admin consent, account items and access revocation
- wristband: TestAuthorizeConsentPath, TestAuthorizeDefaultScopes - pier: TestBackendOnlyGrant, TestLinkedGrantNoScopeLimit (Docker) - cabana: TestTokenScopeNames, TestMCPAdminConsent, TestAccountContributionItems, TestBackendAccessRevokedEvent (Docker); export_test.go exposes the event helper for the de-duplication case
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.golem15.com/golem15/summercms/modules/backpack"
|
||||
"git.golem15.com/golem15/summercms/modules/pact"
|
||||
"git.golem15.com/golem15/summercms/modules/party"
|
||||
"git.golem15.com/golem15/summercms/modules/phrasebook"
|
||||
@@ -129,3 +130,10 @@ func LineDiffForTest(a, b []string, context int) string {
|
||||
}
|
||||
return strings.Join(out, "|")
|
||||
}
|
||||
|
||||
// FireBackendAccessRevokedForTest is fireBackendAccessRevoked, the helper
|
||||
// every D-13 site fires BackendAccessRevokedEvent through: it de-duplicates
|
||||
// and drops zero ids, and fires nothing when no id is left.
|
||||
func FireBackendAccessRevokedForTest(ctx context.Context, app *backpack.App, tx *gorm.DB, reason string, adminIDs ...uint) error {
|
||||
return fireBackendAccessRevoked(ctx, app, tx, reason, adminIDs...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user