MCPcopy
hub / github.com/basecamp/once / TestApplicationVolume

Function TestApplicationVolume

integration/docker_test.go:89–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestApplicationVolume(t *testing.T) {
90 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
91 defer cancel()
92
93 ns, err := docker.NewNamespace("once-volume-label-test")
94 require.NoError(t, err)
95
96 vol1, err := docker.CreateVolume(ctx, ns, "testapp", docker.ApplicationVolumeSettings{SecretKeyBase: "test-secret"})
97 require.NoError(t, err)
98 assert.Equal(t, "test-secret", vol1.SecretKeyBase())
99
100 vol2, err := docker.FindVolume(ctx, ns, "testapp")
101 require.NoError(t, err)
102 assert.Equal(t, vol1.SecretKeyBase(), vol2.SecretKeyBase())
103
104 require.NoError(t, vol1.Destroy(ctx))
105}
106
107func TestGaplessDeployment(t *testing.T) {
108 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)

Callers

nothing calls this directly

Calls 6

NewNamespaceFunction · 0.92
CreateVolumeFunction · 0.92
FindVolumeFunction · 0.92
EqualMethod · 0.80
SecretKeyBaseMethod · 0.80
DestroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…