Skip to content

Commit

Permalink
updated client_test to solve lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushSawant18588 committed Nov 14, 2024
1 parent 6d066bb commit 62fb7e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}()
Expand Down

0 comments on commit 62fb7e7

Please sign in to comment.