(t *testing.T)
| 245 | } |
| 246 | |
| 247 | func TestSetupRemoteConfigurationHTTPError(t *testing.T) { |
| 248 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 249 | http.Error(w, "internal server error", http.StatusInternalServerError) |
| 250 | })) |
| 251 | defer srv.Close() |
| 252 | |
| 253 | closeFunc, manifest, err := setupRemoteConfiguration(context.Background(), srv.URL) |
| 254 | require.Error(t, err) |
| 255 | assert.Nil(t, closeFunc) |
| 256 | assert.Nil(t, manifest) |
| 257 | assert.Contains(t, err.Error(), "http error 500") |
| 258 | } |
| 259 | |
| 260 | func TestSetupRemoteConfigurationMissingManifest(t *testing.T) { |
| 261 | entries := []struct{ name, content string }{ |
nothing calls this directly
no test coverage detected