MCPcopy Create free account
hub / github.com/docker/cli / TestConvertVolumeToMountAnonymousVolume

Function TestConvertVolumeToMountAnonymousVolume

cli/compose/convert/volume_test.go:61–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestConvertVolumeToMountAnonymousVolume(t *testing.T) {
62 config := composetypes.ServiceVolumeConfig{
63 Type: "volume",
64 Target: "/foo/bar",
65 }
66 expected := mount.Mount{
67 Type: mount.TypeVolume,
68 Target: "/foo/bar",
69 }
70 mnt, err := convertVolumeToMount(config, volumes{}, NewNamespace("foo"))
71 assert.NilError(t, err)
72 assert.Check(t, is.DeepEqual(expected, mnt))
73}
74
75func TestConvertVolumeToMountAnonymousBind(t *testing.T) {
76 config := composetypes.ServiceVolumeConfig{

Callers

nothing calls this directly

Calls 2

convertVolumeToMountFunction · 0.85
NewNamespaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…