1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix test flake: update assertion in image verify cache test (#8248)

Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Vishal Choudhary 2023-09-04 18:37:53 +05:30 committed by GitHub
parent e153ead117
commit 2f6ff9902e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1266,7 +1266,7 @@ func Test_ImageVerifyCacheNotary(t *testing.T) {
er, ivm = testImageVerifyCache(imageVerifyCache, context.TODO(), registryclient.NewOrDie(), nil, policyContext, cfg)
secondOperationTime := time.Since(start)
errorAssertionUtil(t, image, ivm, er)
assert.Check(t, secondOperationTime < firstOperationTime/10, "cache entry is valid, so image verification should be from cache.", firstOperationTime, secondOperationTime)
assert.Check(t, secondOperationTime < firstOperationTime, "cache entry is valid, so image verification should be from cache.", firstOperationTime, secondOperationTime)
}
func Test_ImageVerifyCacheExpiredNotary(t *testing.T) {