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

Function TestCortex

pkg/cortex/cortex_test.go:44–144  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42)
43
44func TestCortex(t *testing.T) {
45 cfg := Config{
46 // Include the network names here explicitly. When CLI flags are registered
47 // these values are set as defaults but since we aren't registering them, we
48 // need to include the defaults here. These were hardcoded in a previous version
49 // of weaveworks server.
50 NameValidationScheme: model.LegacyValidation,
51 Server: server.Config{
52 GRPCListenNetwork: server.DefaultNetwork,
53 HTTPListenNetwork: server.DefaultNetwork,
54 },
55 Storage: storage.Config{
56 Engine: storage.StorageEngineBlocks, // makes config easier
57 },
58 Ingester: ingester.Config{
59 BlocksStorageConfig: tsdb.BlocksStorageConfig{
60 Bucket: bucket.Config{
61 Backend: bucket.S3,
62 S3: s3.Config{
63 Endpoint: "localhost",
64 BucketLookupType: s3.BucketPathLookup,
65 },
66 },
67 },
68 LifecyclerConfig: ring.LifecyclerConfig{
69 RingConfig: ring.Config{
70 KVStore: kv.Config{
71 Store: "inmemory",
72 },
73 ReplicationFactor: 3,
74 },
75 InfNames: []string{"en0", "eth0", "lo0", "lo"},
76 },
77 },
78 BlocksStorage: tsdb.BlocksStorageConfig{
79 Bucket: bucket.Config{
80 Backend: bucket.S3,
81 S3: s3.Config{
82 Endpoint: "localhost",
83 BucketLookupType: s3.BucketPathLookup,
84 },
85 },
86 BucketStore: tsdb.BucketStoreConfig{
87 ChunkPoolMinBucketSizeBytes: tsdb.ChunkPoolDefaultMinBucketSize,
88 ChunkPoolMaxBucketSizeBytes: tsdb.ChunkPoolDefaultMaxBucketSize,
89 IndexCache: tsdb.IndexCacheConfig{
90 Backend: tsdb.IndexCacheBackendInMemory,
91 },
92 BucketStoreType: string(tsdb.TSDBBucketStore),
93 },
94 UsersScanner: users.UsersScannerConfig{
95 Strategy: users.UserScanStrategyList,
96 },
97 },
98 RulerStorage: rulestore.Config{
99 Config: bucket.Config{
100 Backend: "local",
101 },

Callers

nothing calls this directly

Calls 6

SetMethod · 0.95
DefaultValuesFunction · 0.92
InitModuleServicesMethod · 0.80
NewFunction · 0.70
EqualMethod · 0.65
StateMethod · 0.65

Tested by

no test coverage detected