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

Function uploadRuntimeConfig

integration/overrides_test.go:36–48  ·  view source on GitHub ↗
(t *testing.T, minio *e2e.HTTPService, runtimeConfig interface{})

Source from the content-addressed store, hash-verified

34}
35
36func uploadRuntimeConfig(t *testing.T, minio *e2e.HTTPService, runtimeConfig interface{}) {
37 runtimeConfigData, err := yaml.Marshal(runtimeConfig)
38 require.NoError(t, err)
39 s3Client, err := s3.NewBucketWithConfig(nil, s3.Config{
40 Endpoint: minio.HTTPEndpoint(),
41 Insecure: true,
42 Bucket: "cortex",
43 AccessKey: e2edb.MinioAccessKey,
44 SecretKey: e2edb.MinioSecretKey,
45 }, "overrides-test", nil)
46 require.NoError(t, err)
47 require.NoError(t, s3Client.Upload(context.Background(), "runtime.yaml", bytes.NewReader(runtimeConfigData)))
48}
49
50func TestOverridesAPIWithRunningCortex(t *testing.T) {
51 s, err := e2e.NewScenario(networkName)

Calls 3

HTTPEndpointMethod · 0.80
MarshalMethod · 0.45
UploadMethod · 0.45

Tested by

no test coverage detected