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
c968bece
Commit
c968bece
authored
Jul 10, 2018
by
Matthew Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable write-read pv check in volume provisioning tests
parent
42178932
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
23 deletions
+22
-23
csi_volumes.go
test/e2e/storage/csi_volumes.go
+0
-2
volume_provisioning.go
test/e2e/storage/volume_provisioning.go
+22
-21
No files found.
test/e2e/storage/csi_volumes.go
View file @
c968bece
...
@@ -132,7 +132,6 @@ func (h *hostpathCSIDriver) createStorageClassTest(node v1.Node) storageClassTes
...
@@ -132,7 +132,6 @@ func (h *hostpathCSIDriver) createStorageClassTest(node v1.Node) storageClassTes
claimSize
:
"1Gi"
,
claimSize
:
"1Gi"
,
expectedSize
:
"1Gi"
,
expectedSize
:
"1Gi"
,
nodeName
:
node
.
Name
,
nodeName
:
node
.
Name
,
attach
:
true
,
}
}
}
}
...
@@ -198,7 +197,6 @@ func (g *gcePDCSIDriver) createStorageClassTest(node v1.Node) storageClassTest {
...
@@ -198,7 +197,6 @@ func (g *gcePDCSIDriver) createStorageClassTest(node v1.Node) storageClassTest {
claimSize
:
"5Gi"
,
claimSize
:
"5Gi"
,
expectedSize
:
"5Gi"
,
expectedSize
:
"5Gi"
,
nodeName
:
node
.
Name
,
nodeName
:
node
.
Name
,
attach
:
true
,
}
}
}
}
...
...
test/e2e/storage/volume_provisioning.go
View file @
c968bece
...
@@ -48,16 +48,16 @@ import (
...
@@ -48,16 +48,16 @@ import (
)
)
type
storageClassTest
struct
{
type
storageClassTest
struct
{
name
string
name
string
cloudProviders
[]
string
cloudProviders
[]
string
provisioner
string
provisioner
string
parameters
map
[
string
]
string
parameters
map
[
string
]
string
claimSize
string
claimSize
string
expectedSize
string
expectedSize
string
pvCheck
func
(
volume
*
v1
.
PersistentVolume
)
error
pvCheck
func
(
volume
*
v1
.
PersistentVolume
)
error
nodeName
string
nodeName
string
attach
bool
skipWriteReadCheck
bool
volumeMode
*
v1
.
PersistentVolumeMode
volumeMode
*
v1
.
PersistentVolumeMode
}
}
const
(
const
(
...
@@ -132,7 +132,7 @@ func testDynamicProvisioning(t storageClassTest, client clientset.Interface, cla
...
@@ -132,7 +132,7 @@ func testDynamicProvisioning(t storageClassTest, client clientset.Interface, cla
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
if
t
.
attach
{
if
!
t
.
skipWriteReadCheck
{
// We start two pods:
// We start two pods:
// - The first writes 'hello word' to the /mnt/test (= the volume).
// - The first writes 'hello word' to the /mnt/test (= the volume).
// - The second one runs grep 'hello world' on /mnt/test.
// - The second one runs grep 'hello world' on /mnt/test.
...
@@ -796,12 +796,12 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
...
@@ -796,12 +796,12 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
serverUrl
:=
"https://"
+
pod
.
Status
.
PodIP
+
":8081"
serverUrl
:=
"https://"
+
pod
.
Status
.
PodIP
+
":8081"
By
(
"creating a StorageClass"
)
By
(
"creating a StorageClass"
)
test
:=
storageClassTest
{
test
:=
storageClassTest
{
name
:
"Gluster Dynamic provisioner test"
,
name
:
"Gluster Dynamic provisioner test"
,
provisioner
:
"kubernetes.io/glusterfs"
,
provisioner
:
"kubernetes.io/glusterfs"
,
claimSize
:
"2Gi"
,
claimSize
:
"2Gi"
,
expectedSize
:
"2Gi"
,
expectedSize
:
"2Gi"
,
parameters
:
map
[
string
]
string
{
"resturl"
:
serverUrl
},
parameters
:
map
[
string
]
string
{
"resturl"
:
serverUrl
},
attach
:
fals
e
,
skipWriteReadCheck
:
tru
e
,
}
}
// GCE/GKE
// GCE/GKE
...
@@ -833,10 +833,11 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
...
@@ -833,10 +833,11 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
By
(
"creating a claim with default class"
)
By
(
"creating a claim with default class"
)
block
:=
v1
.
PersistentVolumeBlock
block
:=
v1
.
PersistentVolumeBlock
test
:=
storageClassTest
{
test
:=
storageClassTest
{
name
:
"default"
,
name
:
"default"
,
claimSize
:
"2Gi"
,
claimSize
:
"2Gi"
,
expectedSize
:
"2Gi"
,
expectedSize
:
"2Gi"
,
volumeMode
:
&
block
,
volumeMode
:
&
block
,
skipWriteReadCheck
:
true
,
}
}
// gce or gke
// gce or gke
if
getDefaultPluginName
()
==
"kubernetes.io/gce-pd"
{
if
getDefaultPluginName
()
==
"kubernetes.io/gce-pd"
{
...
...
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