MCPcopy
hub / github.com/gitpod-io/gitpod / TestCreateBucket

Function TestCreateBucket

test/tests/components/ws-daemon/storage_test.go:20–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18)
19
20func TestCreateBucket(t *testing.T) {
21 f := features.New("DaemonAgent.CreateBucket").
22 WithLabel("component", "ws-daemon").
23 Assess("it should create a bucket", func(_ context.Context, t *testing.T, cfg *envconf.Config) context.Context {
24 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
25 defer cancel()
26
27 rsa, closer, err := integration.Instrument(integration.ComponentWorkspaceDaemon, "daemon", cfg.Namespace(), kubeconfig, cfg.Client(),
28 integration.WithWorkspacekitLift(false),
29 integration.WithContainer("ws-daemon"),
30 )
31 if err != nil {
32 t.Fatal(err)
33 }
34 integration.DeferCloser(t, closer)
35
36 var resp agent.CreateBucketResponse
37 err = rsa.Call("DaemonAgent.CreateBucket", agent.CreateBucketRequest{
38 Owner: fmt.Sprintf("integration-test-%d", time.Now().UnixNano()),
39 Workspace: "test-ws",
40 }, &resp)
41 if err != nil {
42 t.Fatalf("cannot create bucket: %q", err)
43 }
44
45 return ctx
46 }).
47 Feature()
48
49 testEnv.Test(t, f)
50}

Callers

nothing calls this directly

Calls 2

cancelFunction · 0.85
CallMethod · 0.80

Tested by

no test coverage detected