File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -802,6 +802,26 @@ func TestLoadFromStdin_InvalidMountFormat(t *testing.T) {
802802 mounts : `["/host::ro"]` ,
803803 errorMsg : "validation error" ,
804804 },
805+ {
806+ name : "relative source path" ,
807+ mounts : `["relative/path:/container:ro"]` ,
808+ errorMsg : "mount source must be an absolute path" ,
809+ },
810+ {
811+ name : "relative destination path" ,
812+ mounts : `["/host:relative/path:ro"]` ,
813+ errorMsg : "mount destination must be an absolute path" ,
814+ },
815+ {
816+ name : "dot relative source" ,
817+ mounts : `["./config:/app/config:ro"]` ,
818+ errorMsg : "mount source must be an absolute path" ,
819+ },
820+ {
821+ name : "dot relative destination" ,
822+ mounts : `["/host/config:./config:ro"]` ,
823+ errorMsg : "mount destination must be an absolute path" ,
824+ },
805825 }
806826
807827 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments