Updated client_test to solve lint error (#900)

* updated client_test to solve lint error

* modified golangci yml to solve linter issues

* minor change
This commit is contained in:
Ayush Sawant
2024-11-20 02:07:10 +05:30
committed by GitHub
parent 6d066bb12d
commit b3ece4d32e
2 changed files with 11 additions and 5 deletions

View File

@@ -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)
}
}
}()