mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-05 05:42:16 +00:00
chore: add await for project to oidc integration tests (#8809)
# Which Problems Are Solved In integration tests there is waiting for the application, but the project is also included if the token can be created. # How the Problems Are Solved Wait for project not only for the application in the integration tests. # Additional Changes Some more corrections in integration tests. # Additional Context None --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
d696d15a1c
commit
32d958ea43
@@ -80,7 +80,15 @@ func AssertResourceDetails(t assert.TestingT, expected *resources_object.Details
|
||||
gotCreatedDate := actual.GetCreated().AsTime()
|
||||
assert.WithinRange(t, gotCreatedDate, wantCreatedDate.Add(-time.Minute), wantCreatedDate.Add(time.Minute))
|
||||
}
|
||||
assert.Equal(t, expected.GetOwner(), actual.GetOwner())
|
||||
if expected.GetOwner() != nil {
|
||||
expectedOwner := expected.GetOwner()
|
||||
actualOwner := actual.GetOwner()
|
||||
if !assert.NotNil(t, actualOwner) {
|
||||
return
|
||||
}
|
||||
assert.Equal(t, expectedOwner.GetId(), actualOwner.GetId())
|
||||
assert.Equal(t, expectedOwner.GetType(), actualOwner.GetType())
|
||||
}
|
||||
assert.NotEmpty(t, actual.GetId())
|
||||
if expected.GetId() != "" {
|
||||
assert.Equal(t, expected.GetId(), actual.GetId())
|
||||
@@ -99,7 +107,7 @@ func AssertListDetails[L ListDetails, D ListDetailsMsg[L]](t assert.TestingT, ex
|
||||
if wantDetails.GetTimestamp() != nil {
|
||||
gotCD := gotDetails.GetTimestamp().AsTime()
|
||||
wantCD := time.Now()
|
||||
assert.WithinRange(t, gotCD, wantCD.Add(-10*time.Minute), wantCD.Add(time.Minute))
|
||||
assert.WithinRange(t, gotCD, wantCD.Add(-1*time.Minute), wantCD.Add(time.Minute))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user