- Added configuration options for Stalwart hosted mail in .env.example. - Updated Docker Compose to include Stalwart service with health checks. - Introduced new API endpoints for managing mail domains and migration projects. - Enhanced Authentik blueprints for user enrollment and post-migration security. - Updated OAuth handling for Google and Microsoft migration processes. - Improved error handling and response structures in the mail API. - Added integration tests for email claiming and migration workflows.
18 lines
478 B
Go
18 lines
478 B
Go
package migration
|
|
|
|
import "testing"
|
|
|
|
func TestAdminConsentStateRoundTrip(t *testing.T) {
|
|
const projectID = "550e8400-e29b-41d4-a716-446655440000"
|
|
state := EncodeAdminConsentState(projectID)
|
|
if state != adminConsentStatePrefix+projectID {
|
|
t.Fatalf("encode: %q", state)
|
|
}
|
|
if got := ParseAdminConsentProjectID(state); got != projectID {
|
|
t.Fatalf("parse: got %q", got)
|
|
}
|
|
if ParseAdminConsentProjectID("other") != "" {
|
|
t.Fatal("expected empty for unrelated state")
|
|
}
|
|
}
|