mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 06:12:16 +00:00
chore: correct require usage to assert for eventual consistency (#8795)
# Which Problems Are Solved Eventual consistency is handled wrongly in the newly improved integration tests. # How the Problems Are Solved Correct the usage of the require package with the assert package where necessary, to remove the panics where the EventuallyWithT functions can rerun. # Additional Changes Modify the timeout values for some EventuallyWithT which can vary when a instance is freshly setup. # Additional Context None
This commit is contained in:
@@ -593,9 +593,10 @@ func TestServer_ListPasskeys(t *testing.T) {
|
||||
}
|
||||
require.NoError(ttt, err)
|
||||
// always first check length, otherwise its failed anyway
|
||||
assert.Len(ttt, got.Result, len(tt.want.Result))
|
||||
for i := range tt.want.Result {
|
||||
assert.Contains(ttt, got.Result, tt.want.Result[i])
|
||||
if assert.Len(ttt, got.Result, len(tt.want.Result)) {
|
||||
for i := range tt.want.Result {
|
||||
assert.Contains(ttt, got.Result, tt.want.Result[i])
|
||||
}
|
||||
}
|
||||
integration.AssertListDetails(ttt, tt.want, got)
|
||||
}, retryDuration, tick, "timeout waiting for expected idplinks result")
|
||||
|
||||
Reference in New Issue
Block a user