Skip to content

Commit d25af27

Browse files
gloursndeloof
authored andcommitted
add npipe to the volume type enum values
it was forgotten during the introduction of the image type Signed-off-by: Guillaume Lours <[email protected]>
1 parent 31e3c28 commit d25af27

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

loader/loader_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,3 +3799,24 @@ services:
37993799
Image: &types.ServiceVolumeImage{SubPath: "/foo"},
38003800
})
38013801
}
3802+
3803+
func TestNpipeVolume(t *testing.T) {
3804+
p, err := loadYAML(`
3805+
name: imageVolume
3806+
services:
3807+
test:
3808+
volumes:
3809+
- type: npipe
3810+
source: \\.\pipe\docker_engine
3811+
target: \\.\pipe\docker_engine
3812+
image:
3813+
subpath: /foo
3814+
`)
3815+
assert.NilError(t, err)
3816+
assert.DeepEqual(t, p.Services["test"].Volumes[0], types.ServiceVolumeConfig{
3817+
Type: "npipe",
3818+
Source: "\\\\.\\pipe\\docker_engine",
3819+
Target: "\\\\.\\pipe\\docker_engine",
3820+
Image: &types.ServiceVolumeImage{SubPath: "/foo"},
3821+
})
3822+
}

schema/compose-spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
"required": ["type"],
420420
"properties": {
421421
"type": {"type": "string",
422-
"enum": ["bind", "volume", "tmpfs", "cluster", "image"]
422+
"enum": ["bind", "volume", "tmpfs", "cluster", "npipe", "image"]
423423
},
424424
"source": {"type": "string"},
425425
"target": {"type": "string"},

0 commit comments

Comments
 (0)