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
022c05c1
Unverified
Commit
022c05c1
authored
Oct 25, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70254 from msau42/add-out-of-tree-pd-tests
Add new driver config for testing PD CSI driver out of tree
parents
5336866a
9acb8bca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
csi_volumes.go
test/e2e/storage/csi_volumes.go
+32
-4
No files found.
test/e2e/storage/csi_volumes.go
View file @
022c05c1
...
...
@@ -22,7 +22,6 @@ import (
"time"
"k8s.io/api/core/v1"
storagev1
"k8s.io/api/storage/v1"
apiextensionsclient
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/api/errors"
...
...
@@ -56,6 +55,8 @@ type csiTestDriver interface {
var
csiTestDrivers
=
map
[
string
]
func
(
f
*
framework
.
Framework
,
config
framework
.
VolumeTestConfig
)
csiTestDriver
{
"hostPath"
:
initCSIHostpath
,
"gcePD"
:
initCSIgcePD
,
// TODO(#70258): this is temporary until we can figure out how to make e2e tests a library
"[Feature: gcePD-external]"
:
initCSIgcePDExternal
,
}
var
_
=
utils
.
SIGDescribe
(
"CSI Volumes"
,
func
()
{
...
...
@@ -78,8 +79,9 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
nodes
:=
framework
.
GetReadySchedulableNodesOrDie
(
f
.
ClientSet
)
node
=
nodes
.
Items
[
rand
.
Intn
(
len
(
nodes
.
Items
))]
config
=
framework
.
VolumeTestConfig
{
Namespace
:
ns
.
Name
,
Prefix
:
"csi"
,
Namespace
:
ns
.
Name
,
Prefix
:
"csi"
,
// TODO(#70259): this needs to be parameterized so only hostpath sets node name
ClientNodeName
:
node
.
Name
,
ServerNodeName
:
node
.
Name
,
WaitForCompletion
:
true
,
...
...
@@ -387,7 +389,6 @@ func (g *gcePDCSIDriver) createStorageClassTest(node v1.Node) testsuites.Storage
Parameters
:
map
[
string
]
string
{
"type"
:
"pd-standard"
},
ClaimSize
:
"5Gi"
,
ExpectedSize
:
"5Gi"
,
NodeName
:
node
.
Name
,
}
}
...
...
@@ -422,3 +423,30 @@ func (g *gcePDCSIDriver) cleanupCSIDriver() {
csiServiceAccount
(
cs
,
config
,
"gce-controller"
,
true
/* teardown */
)
csiServiceAccount
(
cs
,
config
,
"gce-node"
,
true
/* teardown */
)
}
type
gcePDCSIDriverExternal
struct
{
}
func
initCSIgcePDExternal
(
f
*
framework
.
Framework
,
config
framework
.
VolumeTestConfig
)
csiTestDriver
{
cs
:=
f
.
ClientSet
framework
.
SkipUnlessProviderIs
(
"gce"
,
"gke"
)
framework
.
SkipIfMultizone
(
cs
)
return
&
gcePDCSIDriverExternal
{}
}
func
(
g
*
gcePDCSIDriverExternal
)
createStorageClassTest
(
node
v1
.
Node
)
testsuites
.
StorageClassTest
{
return
testsuites
.
StorageClassTest
{
Name
:
"com.google.csi.gcepd"
,
Provisioner
:
"com.google.csi.gcepd"
,
Parameters
:
map
[
string
]
string
{
"type"
:
"pd-standard"
},
ClaimSize
:
"5Gi"
,
ExpectedSize
:
"5Gi"
,
}
}
func
(
g
*
gcePDCSIDriverExternal
)
createCSIDriver
()
{
}
func
(
g
*
gcePDCSIDriverExternal
)
cleanupCSIDriver
()
{
}
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