MCPcopy Index your code
hub / github.com/cortexproject/cortex / TestNewApiWithoutSourceIPExtractor

Function TestNewApiWithoutSourceIPExtractor

pkg/api/api_test.go:28–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestNewApiWithoutSourceIPExtractor(t *testing.T) {
29 cfg := Config{}
30 serverCfg := server.Config{
31 HTTPListenNetwork: server.DefaultNetwork,
32 MetricsNamespace: "without_source_ip_extractor",
33 }
34 server, err := server.New(serverCfg)
35 require.NoError(t, err)
36
37 api, err := New(cfg, serverCfg, server, &FakeLogger{})
38 require.NoError(t, err)
39 require.Nil(t, api.sourceIPs)
40}
41
42func TestNewApiWithSourceIPExtractor(t *testing.T) {
43 cfg := Config{}

Callers

nothing calls this directly

Calls 1

NewFunction · 0.70

Tested by

no test coverage detected