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

fix: webhook test race

This commit is contained in:
Moritz Johner 2022-01-25 20:45:15 +01:00
parent d52f5c3741
commit ce6f5b1653

View file

@ -298,7 +298,9 @@ func testGetSecret(tc testCase, t *testing.T, client provider.SecretsClient) {
Key: tc.Args.Key,
Version: tc.Args.Version,
}
secret, err := client.GetSecret(context.Background(), testRef)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
secret, err := client.GetSecret(ctx, testRef)
errStr := ""
if err != nil {
errStr = err.Error()