MCPcopy
hub / github.com/docker/compose / TestBuildBindMount

Function TestBuildBindMount

pkg/compose/create_test.go:41–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39)
40
41func TestBuildBindMount(t *testing.T) {
42 project := composetypes.Project{}
43 volume := composetypes.ServiceVolumeConfig{
44 Type: composetypes.VolumeTypeBind,
45 Source: "",
46 Target: "/data",
47 }
48 mount, err := buildMount(project, volume)
49 assert.NilError(t, err)
50 assert.Assert(t, filepath.IsAbs(mount.Source))
51 _, err = os.Stat(mount.Source)
52 assert.NilError(t, err)
53 assert.Equal(t, mount.Type, mountTypes.TypeBind)
54}
55
56func TestBuildNamedPipeMount(t *testing.T) {
57 project := composetypes.Project{}

Callers

nothing calls this directly

Calls 1

buildMountFunction · 0.85

Tested by

no test coverage detected