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
87333097
Commit
87333097
authored
Jul 23, 2015
by
Vish Kannan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11466 from pmorie/hostpath-e2e
Cleanup hostPath e2e tests
parents
dba91426
e677386f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
host_path.go
test/e2e/host_path.go
+5
-5
No files found.
test/e2e/host_path.go
View file @
87333097
...
@@ -31,7 +31,7 @@ import (
...
@@ -31,7 +31,7 @@ import (
//TODO : Consolodate this code with the code for emptyDir.
//TODO : Consolodate this code with the code for emptyDir.
//This will require some smart.
//This will require some smart.
var
_
=
Describe
(
"host
Dir
"
,
func
()
{
var
_
=
Describe
(
"host
Path
"
,
func
()
{
var
(
var
(
c
*
client
.
Client
c
*
client
.
Client
namespace
*
api
.
Namespace
namespace
*
api
.
Namespace
...
@@ -43,7 +43,7 @@ var _ = Describe("hostDir", func() {
...
@@ -43,7 +43,7 @@ var _ = Describe("hostDir", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"Building a namespace api object"
)
By
(
"Building a namespace api object"
)
namespace
,
err
=
createTestingNS
(
"host
dir
"
,
c
)
namespace
,
err
=
createTestingNS
(
"host
path
"
,
c
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
//cleanup before running the test.
//cleanup before running the test.
...
@@ -68,13 +68,13 @@ var _ = Describe("hostDir", func() {
...
@@ -68,13 +68,13 @@ var _ = Describe("hostDir", func() {
fmt
.
Sprintf
(
"--fs_type=%v"
,
volumePath
),
fmt
.
Sprintf
(
"--fs_type=%v"
,
volumePath
),
fmt
.
Sprintf
(
"--file_mode=%v"
,
volumePath
),
fmt
.
Sprintf
(
"--file_mode=%v"
,
volumePath
),
}
}
testContainerOutputInNamespace
(
"
emptydir r/w on tmpfs
"
,
c
,
pod
,
0
,
[]
string
{
testContainerOutputInNamespace
(
"
hostPath mode
"
,
c
,
pod
,
0
,
[]
string
{
"mode of file
\"
/test-volume
\"
: dtrwxrwxrwx"
,
// we expect the sticky bit (mode flag t) to be set for the dir
"mode of file
\"
/test-volume
\"
: dtrwxrwxrwx"
,
// we expect the sticky bit (mode flag t) to be set for the dir
},
},
namespace
.
Name
)
namespace
.
Name
)
})
})
It
(
"should support r/w
on tmpfs
"
,
func
()
{
It
(
"should support r/w"
,
func
()
{
volumePath
:=
"/test-volume"
volumePath
:=
"/test-volume"
filePath
:=
path
.
Join
(
volumePath
,
"test-file"
)
filePath
:=
path
.
Join
(
volumePath
,
"test-file"
)
source
:=
&
api
.
HostPathVolumeSource
{
source
:=
&
api
.
HostPathVolumeSource
{
...
@@ -87,7 +87,7 @@ var _ = Describe("hostDir", func() {
...
@@ -87,7 +87,7 @@ var _ = Describe("hostDir", func() {
fmt
.
Sprintf
(
"--rw_new_file=%v"
,
filePath
),
fmt
.
Sprintf
(
"--rw_new_file=%v"
,
filePath
),
fmt
.
Sprintf
(
"--file_mode=%v"
,
filePath
),
fmt
.
Sprintf
(
"--file_mode=%v"
,
filePath
),
}
}
testContainerOutputInNamespace
(
"
emptydir r/w on tmpfs
"
,
c
,
pod
,
0
,
[]
string
{
testContainerOutputInNamespace
(
"
hostPath r/w
"
,
c
,
pod
,
0
,
[]
string
{
"mode of file
\"
/test-volume/test-file
\"
: -rw-r--r--"
,
"mode of file
\"
/test-volume/test-file
\"
: -rw-r--r--"
,
"content of file
\"
/test-volume/test-file
\"
: mount-tester new file"
,
"content of file
\"
/test-volume/test-file
\"
: mount-tester new file"
,
},
namespace
.
Name
,
},
namespace
.
Name
,
...
...
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