- Added endpoints for listing and importing migration rosters. - Introduced audit export functionality for migration jobs in CSV and NDJSON formats. - Implemented tenant mismatch validation for Microsoft migration claims. - Enhanced error handling for email claiming and migration processes. - Added integration tests for roster import and claim workflows.
27 lines
611 B
Go
27 lines
611 B
Go
package users
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestLookupUserIDEmptyExternalID(t *testing.T) {
|
|
_, err := LookupUserID(t.Context(), nil, "")
|
|
if err == nil {
|
|
t.Fatal("expected error for empty external id")
|
|
}
|
|
}
|
|
|
|
func TestLookupUserIDByEmailEmpty(t *testing.T) {
|
|
_, err := LookupUserIDByEmail(t.Context(), nil, "")
|
|
if err == nil {
|
|
t.Fatal("expected error for empty email")
|
|
}
|
|
}
|
|
|
|
func TestResolveProvisionUserRequiresIdentity(t *testing.T) {
|
|
_, err := ResolveProvisionUser(t.Context(), nil, "", "user@example.com", "User")
|
|
if err == nil {
|
|
t.Fatal("expected error without external_id or existing user")
|
|
}
|
|
}
|