forked from baron/baron-sso
feat(user): support fixed UUID registration and enhance bulk import results
- Added support for fixed UUIDs during bulk registration (Search-first + ExternalID mapping) - Implemented idempotency and visibility restoration for soft-deleted users - Enhanced bulk upload UI to show 'New/Updated/Unchanged' status and modified fields - Added logic to reclaim identifiers (login_id) from colliding records - Added frontend E2E and backend unit tests for UUID integrity and conflict handling - Fixed i18n, formatting, and mock tests to satisfy code-check - Applied 'go fix' for 'omitzero' tags and general Go standards
This commit is contained in:
@@ -57,15 +57,15 @@ func TestShouldFilterNoisyClientInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSanitizeClientLogData(t *testing.T) {
|
||||
input := map[string]interface{}{
|
||||
input := map[string]any{
|
||||
"token": "raw-token",
|
||||
"safe": "ok",
|
||||
"nested": map[string]interface{}{
|
||||
"nested": map[string]any{
|
||||
"new_password": "secret-1",
|
||||
"path": "/ko/profile",
|
||||
},
|
||||
"arr": []interface{}{
|
||||
map[string]interface{}{"authorization": "Bearer abc"},
|
||||
"arr": []any{
|
||||
map[string]any{"authorization": "Bearer abc"},
|
||||
"token=abc123",
|
||||
},
|
||||
}
|
||||
@@ -75,12 +75,12 @@ func TestSanitizeClientLogData(t *testing.T) {
|
||||
assert.Equal(t, "*****", result["token"])
|
||||
assert.Equal(t, "ok", result["safe"])
|
||||
|
||||
nested := result["nested"].(map[string]interface{})
|
||||
nested := result["nested"].(map[string]any)
|
||||
assert.Equal(t, "*****", nested["new_password"])
|
||||
assert.Equal(t, "/ko/profile", nested["path"])
|
||||
|
||||
arr := result["arr"].([]interface{})
|
||||
first := arr[0].(map[string]interface{})
|
||||
arr := result["arr"].([]any)
|
||||
first := arr[0].(map[string]any)
|
||||
assert.Equal(t, "*****", first["authorization"])
|
||||
assert.Equal(t, "token=*****", arr[1])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user