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
07ebe323
Commit
07ebe323
authored
Sep 05, 2018
by
Michelle Au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gce localssd pv tests
parent
d7c84996
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
persistent_volumes-local.go
test/e2e/storage/persistent_volumes-local.go
+8
-2
No files found.
test/e2e/storage/persistent_volumes-local.go
View file @
07ebe323
...
@@ -940,7 +940,12 @@ func setupLocalVolumeGCELocalSSD(config *localTestConfig, node *v1.Node) *localT
...
@@ -940,7 +940,12 @@ func setupLocalVolumeGCELocalSSD(config *localTestConfig, node *v1.Node) *localT
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
dirName
:=
strings
.
Fields
(
res
)[
0
]
dirName
:=
strings
.
Fields
(
res
)[
0
]
hostDir
:=
"/mnt/disks/by-uuid/google-local-ssds-scsi-fs/"
+
dirName
hostDir
:=
"/mnt/disks/by-uuid/google-local-ssds-scsi-fs/"
+
dirName
return
generateLocalTestVolume
(
hostDir
,
config
,
GCELocalSSDVolumeType
,
node
)
// gce local ssd does not need to create a directory
return
&
localTestVolume
{
node
:
node
,
hostDir
:
hostDir
,
localVolumeType
:
GCELocalSSDVolumeType
,
}
}
}
func
setupLocalVolumeDirectory
(
config
*
localTestConfig
,
node
*
v1
.
Node
)
*
localTestVolume
{
func
setupLocalVolumeDirectory
(
config
*
localTestConfig
,
node
*
v1
.
Node
)
*
localTestVolume
{
...
@@ -1108,7 +1113,8 @@ func verifyLocalPod(config *localTestConfig, volume *localTestVolume, pod *v1.Po
...
@@ -1108,7 +1113,8 @@ func verifyLocalPod(config *localTestConfig, volume *localTestVolume, pod *v1.Po
// Deletes the PVC/PV, and launches a pod with hostpath volume to remove the test directory.
// Deletes the PVC/PV, and launches a pod with hostpath volume to remove the test directory.
func
cleanupLocalVolumeGCELocalSSD
(
config
*
localTestConfig
,
volume
*
localTestVolume
)
{
func
cleanupLocalVolumeGCELocalSSD
(
config
*
localTestConfig
,
volume
*
localTestVolume
)
{
By
(
"Removing the test directory"
)
By
(
"Removing the test directory"
)
removeCmd
:=
fmt
.
Sprintf
(
"rm %s"
,
volume
.
hostDir
+
"/"
+
testFile
)
file
:=
volume
.
hostDir
+
"/"
+
testFile
removeCmd
:=
fmt
.
Sprintf
(
"if [ -f %s ]; then rm %s; fi"
,
file
,
file
)
err
:=
issueNodeCommand
(
config
,
removeCmd
,
volume
.
node
)
err
:=
issueNodeCommand
(
config
,
removeCmd
,
volume
.
node
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
...
...
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