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
d33211dc
Commit
d33211dc
authored
Nov 07, 2018
by
Masaki Kimura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test driver's unique name consistent
Fixes: #70760
parent
a3207664
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
csi_volumes.go
test/e2e/storage/csi_volumes.go
+1
-1
base.go
test/e2e/storage/drivers/base.go
+5
-0
csi.go
test/e2e/storage/drivers/csi.go
+4
-4
No files found.
test/e2e/storage/csi_volumes.go
View file @
d33211dc
...
...
@@ -192,7 +192,7 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
test
:=
t
It
(
test
.
name
,
func
()
{
if
test
.
driverExists
{
csiDriver
:=
createCSIDriver
(
csics
,
"csi-hostpath-"
+
f
.
UniqueName
,
test
.
driverAttachable
)
csiDriver
:=
createCSIDriver
(
csics
,
drivers
.
GetUniqueDriverName
(
driver
)
,
test
.
driverAttachable
)
if
csiDriver
!=
nil
{
defer
csics
.
CsiV1alpha1
()
.
CSIDrivers
()
.
Delete
(
csiDriver
.
Name
,
nil
)
}
...
...
test/e2e/storage/drivers/base.go
View file @
d33211dc
...
...
@@ -176,3 +176,8 @@ func getStorageClass(
VolumeBindingMode
:
bindingMode
,
}
}
// GetUniqueDriverName returns unique driver name that can be used parallelly in tests
func
GetUniqueDriverName
(
driver
TestDriver
)
string
{
return
fmt
.
Sprintf
(
"%s-%s"
,
driver
.
GetDriverInfo
()
.
Name
,
driver
.
GetDriverInfo
()
.
Framework
.
UniqueName
)
}
test/e2e/storage/drivers/csi.go
View file @
d33211dc
...
...
@@ -82,7 +82,7 @@ func (h *hostpathCSIDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern
}
func
(
h
*
hostpathCSIDriver
)
GetDynamicProvisionStorageClass
(
fsType
string
)
*
storagev1
.
StorageClass
{
provisioner
:=
h
.
driverInfo
.
Name
+
h
.
driverInfo
.
Framework
.
UniqueName
provisioner
:=
GetUniqueDriverName
(
h
)
parameters
:=
map
[
string
]
string
{}
ns
:=
h
.
driverInfo
.
Framework
.
Namespace
.
Name
suffix
:=
fmt
.
Sprintf
(
"%s-sc"
,
provisioner
)
...
...
@@ -105,7 +105,7 @@ func (h *hostpathCSIDriver) CreateDriver() {
// settings are ignored for this test. We could patch the image definitions.
o
:=
utils
.
PatchCSIOptions
{
OldDriverName
:
h
.
driverInfo
.
Name
,
NewDriverName
:
h
.
driverInfo
.
Name
+
h
.
driverInfo
.
Framework
.
UniqueName
,
NewDriverName
:
GetUniqueDriverName
(
h
)
,
DriverContainerName
:
"hostpath"
,
ProvisionerContainerName
:
"csi-provisioner"
,
NodeName
:
h
.
driverInfo
.
Config
.
ServerNodeName
,
...
...
@@ -199,8 +199,8 @@ func (g *gcePDCSIDriver) CreateDriver() {
//
// These are the options which would have to be used:
// o := utils.PatchCSIOptions{
// OldDriverName:
"com.google.csi.gcepd"
,
// NewDriverName:
"com.google.csi.gcepd-" + g.f.UniqueName
,
// OldDriverName:
g.driverInfo.Name
,
// NewDriverName:
GetUniqueDriverName(g)
,
// DriverContainerName: "gce-driver",
// ProvisionerContainerName: "csi-external-provisioner",
// }
...
...
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