From 3c8e88a085bab3142dfff6ef9a8e49c29a5c877d Mon Sep 17 00:00:00 2001 From: Brenna N Epp Date: Wed, 7 Aug 2024 08:15:34 -0700 Subject: [PATCH] fix(storage): check for grpc NotFound error in HMAC test (#10645) Co-authored-by: Chris Cotter --- storage/integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/integration_test.go b/storage/integration_test.go index 4b0ffe0b924f..b5d445030e7e 100644 --- a/storage/integration_test.go +++ b/storage/integration_test.go @@ -5354,7 +5354,7 @@ func TestIntegration_HMACKey(t *testing.T) { } _, err = hkh.Get(ctx) - if err != nil && !strings.Contains(err.Error(), "404") { + if err != nil && !errorIsStatusCode(err, http.StatusNotFound, codes.NotFound) { // If the deleted key has already been garbage collected, a 404 is expected. // Other errors should cause a failure and are not expected. t.Fatalf("Unexpected error: %v", err)