MCPcopy Create free account
hub / github.com/cortexproject/cortex / spinup

Function spinup

integration/e2e/scenario_test.go:24–44  ·  view source on GitHub ↗
(t *testing.T, networkName string)

Source from the content-addressed store, hash-verified

22const bktName = "cheesecake"
23
24func spinup(t *testing.T, networkName string) (*e2e.Scenario, *e2e.HTTPService, *e2e.HTTPService) {
25 s, err := e2e.NewScenario(networkName)
26 assert.NoError(t, err)
27
28 m1 := e2edb.NewMinio(9000, bktName)
29 m2 := e2edb.NewMinio(9001, bktName)
30
31 closePlease := true
32 defer func() {
33 if closePlease {
34 // You're welcome.
35 s.Close()
36 }
37 }()
38 require.NoError(t, s.StartAndWaitReady(m1, m2))
39 require.Error(t, s.Start(m1))
40 require.Error(t, s.Start(e2edb.NewMinio(9000, "cheescake")))
41
42 closePlease = false
43 return s, m1, m2
44}
45
46func testMinioWorking(t *testing.T, m *e2e.HTTPService) {
47 ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)

Callers 1

TestScenarioFunction · 0.85

Calls 5

CloseMethod · 0.95
StartAndWaitReadyMethod · 0.95
StartMethod · 0.95
NewScenarioFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected