MCPcopy Index your code
hub / github.com/docker/cli / TestConvertVolumeToMountAnonymousBind

Function TestConvertVolumeToMountAnonymousBind

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

Source from the content-addressed store, hash-verified

73}
74
75func TestConvertVolumeToMountAnonymousBind(t *testing.T) {
76 config := composetypes.ServiceVolumeConfig{
77 Type: "bind",
78 Target: "/foo/bar",
79 Bind: &composetypes.ServiceVolumeBind{
80 Propagation: "slave",
81 },
82 }
83 _, err := convertVolumeToMount(config, volumes{}, NewNamespace("foo"))
84 assert.Error(t, err, "invalid bind source, source cannot be empty")
85}
86
87func TestConvertVolumeToMountUnapprovedType(t *testing.T) {
88 config := composetypes.ServiceVolumeConfig{

Callers

nothing calls this directly

Calls 3

convertVolumeToMountFunction · 0.85
NewNamespaceFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…