(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func TestInspectAPIKey_InvalidCredentials(t *testing.T) { |
| 158 | stub := &stubAPIKeyInspector{ |
| 159 | listErr: errors.New("API error [403] invalid"), // fall back to GetApiKey |
| 160 | getErr: errors.New("API error [403] invalid"), |
| 161 | } |
| 162 | |
| 163 | _, _, err := inspectAPIKey(stub, "bad-key") |
| 164 | require.Error(t, err) |
| 165 | assert.Equal(t, "invalid application credentials", err.Error()) |
| 166 | } |
nothing calls this directly
no test coverage detected