From 62fb7e7805ebd8865defc7dc1cd0940600cacafd Mon Sep 17 00:00:00 2001 From: ayush Date: Thu, 14 Nov 2024 09:36:23 +0000 Subject: [PATCH] updated client_test to solve lint error --- client_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client_test.go b/client_test.go index 354a6b3f..2ed82f13 100644 --- a/client_test.go +++ b/client_test.go @@ -513,8 +513,14 @@ func TestClient_suffixWithAPIVersion(t *testing.T) { } defer func() { if r := recover(); r != nil { - if r.(string) != tt.wantPanic { - t.Errorf("suffixWithAPIVersion() = %v, want %v", r, tt.wantPanic) + // Check if the panic message matches the expected panic message + if rStr, ok := r.(string); ok { + if rStr != tt.wantPanic { + t.Errorf("suffixWithAPIVersion() = %v, want %v", rStr, tt.wantPanic) + } + } else { + // If the panic is not a string, log it + t.Errorf("suffixWithAPIVersion() panicked with non-string value: %v", r) } } }()