mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 02:07:24 +00:00

# Which Problems Are Solved - Adds support for the list users SCIM v2 endpoint # How the Problems Are Solved - Adds support for the list users SCIM v2 endpoints under `GET /scim/v2/{orgID}/Users` and `POST /scim/v2/{orgID}/Users/.search` # Additional Changes - adds a new function `SearchUserMetadataForUsers` to the query layer to query a metadata keyset for given user ids - adds a new function `NewUserMetadataExistsQuery` to the query layer to query a given metadata key value pair exists - adds a new function `CountUsers` to the query layer to count users without reading any rows - handle `ErrorAlreadyExists` as scim errors `uniqueness` - adds `NumberLessOrEqual` and `NumberGreaterOrEqual` query comparison methods - adds `BytesQuery` with `BytesEquals` and `BytesNotEquals` query comparison methods # Additional Context Part of #8140 Supported fields for scim filters: * `meta.created` * `meta.lastModified` * `id` * `username` * `name.familyName` * `name.givenName` * `emails` and `emails.value` * `active` only eq and ne * `externalId` only eq and ne
53 lines
902 B
Go
53 lines
902 B
Go
package integration
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
|
|
object "github.com/zitadel/zitadel/pkg/grpc/object/v2beta"
|
|
)
|
|
|
|
type myMsg struct {
|
|
details *object.Details
|
|
}
|
|
|
|
func (m myMsg) GetDetails() *object.Details {
|
|
return m.details
|
|
}
|
|
|
|
func TestAssertDetails(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
exptected myMsg
|
|
actual myMsg
|
|
}{
|
|
{
|
|
name: "nil",
|
|
exptected: myMsg{},
|
|
actual: myMsg{},
|
|
},
|
|
{
|
|
name: "values",
|
|
exptected: myMsg{
|
|
details: &object.Details{
|
|
ResourceOwner: "me",
|
|
ChangeDate: timestamppb.Now(),
|
|
},
|
|
},
|
|
actual: myMsg{
|
|
details: &object.Details{
|
|
Sequence: 123,
|
|
ChangeDate: timestamppb.Now(),
|
|
ResourceOwner: "me",
|
|
},
|
|
},
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
AssertDetails(t, tt.exptected, tt.actual)
|
|
})
|
|
}
|
|
}
|