Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6daab262
Unverified
Commit
6daab262
authored
Nov 01, 2016
by
Paulo Pires
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Volume mount with colon in path is now allowed because it's how it works on Windows.
parent
9e6815e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
validation_test.go
pkg/api/validation/validation_test.go
+1
-1
No files found.
pkg/api/validation/validation_test.go
View file @
6daab262
...
@@ -2611,6 +2611,7 @@ func TestValidateVolumeMounts(t *testing.T) {
...
@@ -2611,6 +2611,7 @@ func TestValidateVolumeMounts(t *testing.T) {
{
Name
:
"abc-123"
,
MountPath
:
"/bab"
,
SubPath
:
"baz"
},
{
Name
:
"abc-123"
,
MountPath
:
"/bab"
,
SubPath
:
"baz"
},
{
Name
:
"abc-123"
,
MountPath
:
"/bac"
,
SubPath
:
".baz"
},
{
Name
:
"abc-123"
,
MountPath
:
"/bac"
,
SubPath
:
".baz"
},
{
Name
:
"abc-123"
,
MountPath
:
"/bad"
,
SubPath
:
"..baz"
},
{
Name
:
"abc-123"
,
MountPath
:
"/bad"
,
SubPath
:
"..baz"
},
{
Name
:
"abc"
,
MountPath
:
"c:/foo/bar"
},
}
}
if
errs
:=
validateVolumeMounts
(
successCase
,
volumes
,
field
.
NewPath
(
"field"
));
len
(
errs
)
!=
0
{
if
errs
:=
validateVolumeMounts
(
successCase
,
volumes
,
field
.
NewPath
(
"field"
));
len
(
errs
)
!=
0
{
t
.
Errorf
(
"expected success: %v"
,
errs
)
t
.
Errorf
(
"expected success: %v"
,
errs
)
...
@@ -2620,7 +2621,6 @@ func TestValidateVolumeMounts(t *testing.T) {
...
@@ -2620,7 +2621,6 @@ func TestValidateVolumeMounts(t *testing.T) {
"empty name"
:
{{
Name
:
""
,
MountPath
:
"/foo"
}},
"empty name"
:
{{
Name
:
""
,
MountPath
:
"/foo"
}},
"name not found"
:
{{
Name
:
""
,
MountPath
:
"/foo"
}},
"name not found"
:
{{
Name
:
""
,
MountPath
:
"/foo"
}},
"empty mountpath"
:
{{
Name
:
"abc"
,
MountPath
:
""
}},
"empty mountpath"
:
{{
Name
:
"abc"
,
MountPath
:
""
}},
"colon mountpath"
:
{{
Name
:
"abc"
,
MountPath
:
"foo:bar"
}},
"mountpath collision"
:
{{
Name
:
"foo"
,
MountPath
:
"/path/a"
},
{
Name
:
"bar"
,
MountPath
:
"/path/a"
}},
"mountpath collision"
:
{{
Name
:
"foo"
,
MountPath
:
"/path/a"
},
{
Name
:
"bar"
,
MountPath
:
"/path/a"
}},
"absolute subpath"
:
{{
Name
:
"abc"
,
MountPath
:
"/bar"
,
SubPath
:
"/baz"
}},
"absolute subpath"
:
{{
Name
:
"abc"
,
MountPath
:
"/bar"
,
SubPath
:
"/baz"
}},
"subpath in .."
:
{{
Name
:
"abc"
,
MountPath
:
"/bar"
,
SubPath
:
"../baz"
}},
"subpath in .."
:
{{
Name
:
"abc"
,
MountPath
:
"/bar"
,
SubPath
:
"../baz"
}},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment