mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 02:35:12 +00:00
chore: fix some eventual consistent integration testing (#10752)
# Which Problems Are Solved Flakiness in integration tests because of eventual consistentcy. # How the Problems Are Solved Split tests related to feature flags and other eventual consistent resources. # Additional Changes None # Additional Context None Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
@@ -668,13 +668,12 @@ func TestListApplicationKeys(t *testing.T) {
|
||||
tomorrow := time.Now().AddDate(0, 0, 1)
|
||||
in2Days := tomorrow.AddDate(0, 0, 1)
|
||||
in3Days := in2Days.AddDate(0, 0, 1)
|
||||
in4Days := in3Days.AddDate(0, 0, 1)
|
||||
|
||||
appKey1 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp1.GetAppId(), in2Days)
|
||||
appKey2 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp1.GetAppId(), in3Days)
|
||||
appKey1 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp1.GetAppId(), in3Days)
|
||||
appKey2 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp1.GetAppId(), in4Days)
|
||||
appKey3 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp1.GetAppId(), tomorrow)
|
||||
appKey4 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp2.GetAppId(), tomorrow)
|
||||
|
||||
t.Parallel()
|
||||
appKey4 := createAppKey(t, IAMOwnerCtx, instance, p.GetId(), createdApiApp2.GetAppId(), in2Days)
|
||||
|
||||
tt := []struct {
|
||||
testName string
|
||||
@@ -728,7 +727,6 @@ func TestListApplicationKeys(t *testing.T) {
|
||||
require.Equal(ttt, tc.expectedErrorType, status.Code(err))
|
||||
if tc.expectedErrorType == codes.OK {
|
||||
require.Len(ttt, res.GetKeys(), len(tc.expectedAppKeysIDs))
|
||||
|
||||
for i, k := range res.GetKeys() {
|
||||
assert.Equal(ttt, tc.expectedAppKeysIDs[i], k.GetId())
|
||||
}
|
||||
|
||||
@@ -212,8 +212,6 @@ func createAppKey(t *testing.T, ctx context.Context, inst *integration.Instance,
|
||||
ExpirationDate: timestamppb.New(expirationDate.UTC()),
|
||||
},
|
||||
)
|
||||
|
||||
require.Nil(t, err)
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user