diff --git a/agent/agent_test.go b/agent/agent_test.go index 75366fcf6..149f3610b 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -912,7 +912,7 @@ func TestCacheRateLimit(test *testing.T) { require.NoError(t, err) resp := httptest.NewRecorder() - a.srv.Handler.ServeHTTP(resp, req) + a.srv.handler(false).ServeHTTP(resp, req) // Key doesn't actually exist so we should get 404 if got, want := resp.Code, http.StatusOK; got != want { t.Fatalf("bad response code got %d want %d", got, want) diff --git a/agent/cache-types/catalog_list_services_test.go b/agent/cache-types/catalog_list_services_test.go index efb1ff33f..a8f66ab25 100644 --- a/agent/cache-types/catalog_list_services_test.go +++ b/agent/cache-types/catalog_list_services_test.go @@ -82,7 +82,7 @@ func TestCatalogListServices_IntegrationWithCache_NotModifiedResponse(t *testing reply.NotModified = true }) - c := cache.New(nil) + c := cache.New(cache.Options{}) c.RegisterType(CatalogListServicesName, typ) last := cache.FetchResult{ Value: &structs.IndexedServices{ diff --git a/agent/cert-monitor/cert_monitor_test.go b/agent/cert-monitor/cert_monitor_test.go index dbbd63b5b..07a65b4a1 100644 --- a/agent/cert-monitor/cert_monitor_test.go +++ b/agent/cert-monitor/cert_monitor_test.go @@ -633,7 +633,7 @@ func TestCertMonitor_New_Errors(t *testing.T) { }, "no-tls-configurator": { cfg: Config{ - Cache: cache.New(nil), + Cache: cache.New(cache.Options{}), Fallback: fallback, Tokens: tokens, Datacenter: "foo", @@ -643,7 +643,7 @@ func TestCertMonitor_New_Errors(t *testing.T) { }, "no-fallback": { cfg: Config{ - Cache: cache.New(nil), + Cache: cache.New(cache.Options{}), TLSConfigurator: testTLSConfigurator(t), Tokens: tokens, Datacenter: "foo", @@ -653,7 +653,7 @@ func TestCertMonitor_New_Errors(t *testing.T) { }, "no-tokens": { cfg: Config{ - Cache: cache.New(nil), + Cache: cache.New(cache.Options{}), TLSConfigurator: testTLSConfigurator(t), Fallback: fallback, Datacenter: "foo", @@ -663,7 +663,7 @@ func TestCertMonitor_New_Errors(t *testing.T) { }, "no-datacenter": { cfg: Config{ - Cache: cache.New(nil), + Cache: cache.New(cache.Options{}), TLSConfigurator: testTLSConfigurator(t), Fallback: fallback, Tokens: tokens, @@ -673,7 +673,7 @@ func TestCertMonitor_New_Errors(t *testing.T) { }, "no-node-name": { cfg: Config{ - Cache: cache.New(nil), + Cache: cache.New(cache.Options{}), TLSConfigurator: testTLSConfigurator(t), Fallback: fallback, Tokens: tokens,