mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat: replace user scim v2 endpoint (#9163)
# Which Problems Are Solved - Adds support for the replace user SCIM v2 endpoint # How the Problems Are Solved - Adds support for the replace user SCIM v2 endpoint under `PUT /scim/v2/{orgID}/Users/{id}` # Additional Changes - Respect the `Active` field in the SCIM v2 create user endpoint `POST /scim/v2/{orgID}/Users` - Eventually consistent read endpoints used in SCIM tests are wrapped in `assert.EventuallyWithT` to work around race conditions # Additional Context Part of #8140
This commit is contained in:
@@ -171,9 +171,13 @@ func diffProto(expected, actual proto.Message) string {
|
||||
return "\n\nDiff:\n" + diff
|
||||
}
|
||||
|
||||
func AssertMapContains[M ~map[K]V, K comparable, V any](t *testing.T, m M, key K, expectedValue V) {
|
||||
func AssertMapContains[M ~map[K]V, K comparable, V any](t assert.TestingT, m M, key K, expectedValue V) {
|
||||
val, exists := m[key]
|
||||
assert.True(t, exists, "Key '%s' should exist in the map", key)
|
||||
if !exists {
|
||||
return
|
||||
}
|
||||
|
||||
assert.Equal(t, expectedValue, val, "Key '%s' should have value '%d'", key, expectedValue)
|
||||
}
|
||||
|
||||
@@ -195,7 +199,7 @@ func partiallyDeepEqual(expected, actual reflect.Value) bool {
|
||||
// Dereference pointers if needed
|
||||
if expected.Kind() == reflect.Ptr {
|
||||
if expected.IsNil() {
|
||||
return actual.IsNil()
|
||||
return true
|
||||
}
|
||||
|
||||
expected = expected.Elem()
|
||||
|
Reference in New Issue
Block a user