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
7dbe426b
Unverified
Commit
7dbe426b
authored
Feb 27, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74320 from gnufied/cleanup-csi-test-dups
Add e2e for CSI volume limit
parents
5d0e293b
2516cbd4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
2 deletions
+11
-2
BUILD
test/e2e/storage/BUILD
+1
-0
csi_mock_volume.go
test/e2e/storage/csi_mock_volume.go
+0
-0
csi_volumes.go
test/e2e/storage/csi_volumes.go
+0
-0
csi.go
test/e2e/storage/drivers/csi.go
+8
-1
volume_limits.go
test/e2e/storage/volume_limits.go
+0
-1
csi-mock-driver.yaml
...e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml
+2
-0
No files found.
test/e2e/storage/BUILD
View file @
7dbe426b
...
...
@@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"csi_mock_volume.go",
"csi_volumes.go",
"detach_mounted.go",
"empty_dir_wrapper.go",
...
...
test/e2e/storage/csi_mock_volume.go
0 → 100644
View file @
7dbe426b
This diff is collapsed.
Click to expand it.
test/e2e/storage/csi_volumes.go
View file @
7dbe426b
This diff is collapsed.
Click to expand it.
test/e2e/storage/drivers/csi.go
View file @
7dbe426b
...
...
@@ -38,6 +38,7 @@ package drivers
import
(
"fmt"
"math/rand"
"strconv"
.
"github.com/onsi/ginkgo"
storagev1
"k8s.io/api/storage/v1"
...
...
@@ -171,13 +172,14 @@ type mockCSIDriver struct {
manifests
[]
string
podInfoVersion
*
string
attachable
bool
attachLimit
int
}
var
_
testsuites
.
TestDriver
=
&
mockCSIDriver
{}
var
_
testsuites
.
DynamicPVTestDriver
=
&
mockCSIDriver
{}
// InitMockCSIDriver returns a mockCSIDriver that implements TestDriver interface
func
InitMockCSIDriver
(
registerDriver
,
driverAttachable
bool
,
podInfoVersion
*
string
)
testsuites
.
TestDriver
{
func
InitMockCSIDriver
(
registerDriver
,
driverAttachable
bool
,
podInfoVersion
*
string
,
attachLimit
int
)
testsuites
.
TestDriver
{
driverManifests
:=
[]
string
{
"test/e2e/testing-manifests/storage-csi/cluster-driver-registrar/rbac.yaml"
,
"test/e2e/testing-manifests/storage-csi/driver-registrar/rbac.yaml"
,
...
...
@@ -213,6 +215,7 @@ func InitMockCSIDriver(registerDriver, driverAttachable bool, podInfoVersion *st
manifests
:
driverManifests
,
podInfoVersion
:
podInfoVersion
,
attachable
:
driverAttachable
,
attachLimit
:
attachLimit
,
}
}
...
...
@@ -256,6 +259,10 @@ func (m *mockCSIDriver) PrepareTest(f *framework.Framework) (*testsuites.PerTest
containerArgs
=
append
(
containerArgs
,
"--disable-attach"
)
}
if
m
.
attachLimit
>
0
{
containerArgs
=
append
(
containerArgs
,
"--attach-limit"
,
strconv
.
Itoa
(
m
.
attachLimit
))
}
// TODO (?): the storage.csi.image.version and storage.csi.image.registry
// settings are ignored for this test. We could patch the image definitions.
o
:=
utils
.
PatchCSIOptions
{
...
...
test/e2e/storage/volume_limits.go
View file @
7dbe426b
...
...
@@ -47,7 +47,6 @@ var _ = utils.SIGDescribe("Volume limits", func() {
framework
.
Failf
(
"Expected volume limits to be set"
)
}
}
})
})
...
...
test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml
View file @
7dbe426b
...
...
@@ -44,6 +44,8 @@ spec:
apiVersion
:
v1
fieldPath
:
spec.nodeName
imagePullPolicy
:
Always
securityContext
:
privileged
:
true
volumeMounts
:
-
mountPath
:
/csi
name
:
socket-dir
...
...
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