mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:17:35 +00:00
fix(user fields): missing creationDate in details (#9250)
# Which Problems Are Solved The `creationDate` property on user search V2 endpoint was missing # How the Problems Are Solved Added property in v2 `object.proto` and in the function creating the details on each call # Additional Changes - none # Additional Context closes #8552 --------- Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
type Details interface {
|
||||
comparable
|
||||
GetSequence() uint64
|
||||
GetCreationDate() *timestamppb.Timestamp
|
||||
GetChangeDate() *timestamppb.Timestamp
|
||||
GetResourceOwner() string
|
||||
}
|
||||
@@ -62,6 +63,12 @@ func AssertDetails[D Details, M DetailsMsg[D]](t assert.TestingT, expected, actu
|
||||
|
||||
assert.NotZero(t, gotDetails.GetSequence())
|
||||
|
||||
if wantDetails.GetCreationDate() != nil {
|
||||
wantCreationDate := time.Now()
|
||||
gotCreationDate := gotDetails.GetCreationDate().AsTime()
|
||||
assert.WithinRange(t, gotCreationDate, wantCreationDate.Add(-time.Minute), wantCreationDate.Add(time.Minute))
|
||||
}
|
||||
|
||||
if wantDetails.GetChangeDate() != nil {
|
||||
wantChangeDate := time.Now()
|
||||
gotChangeDate := gotDetails.GetChangeDate().AsTime()
|
||||
|
Reference in New Issue
Block a user