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
95c3cbaf
Unverified
Commit
95c3cbaf
authored
Feb 15, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74094 from gnufied/fix-multizone-test-resizing
Use delayed binding for multizone tests
parents
e691e5f2
abb2fc65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
mounted_volume_resize.go
test/e2e/storage/mounted_volume_resize.go
+11
-5
No files found.
test/e2e/storage/mounted_volume_resize.go
View file @
95c3cbaf
...
...
@@ -77,6 +77,7 @@ var _ = utils.SIGDescribe("Mounted volume expand", func() {
Name
:
"default"
,
ClaimSize
:
"2Gi"
,
AllowVolumeExpansion
:
true
,
DelayBinding
:
true
,
}
resizableSc
,
err
=
createStorageClass
(
test
,
ns
,
"resizing"
,
c
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Error creating resizable storage class"
)
...
...
@@ -107,17 +108,22 @@ var _ = utils.SIGDescribe("Mounted volume expand", func() {
})
It
(
"Should verify mounted devices can be resized"
,
func
()
{
By
(
"Waiting for PVC to be in bound phase"
)
pvcClaims
:=
[]
*
v1
.
PersistentVolumeClaim
{
pvc
}
pvs
,
err
:=
framework
.
WaitForPVClaimBoundPhase
(
c
,
pvcClaims
,
framework
.
ClaimProvisionTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Failed waiting for PVC to be bound %v"
,
err
)
Expect
(
len
(
pvs
))
.
To
(
Equal
(
1
))
By
(
"Creating a deployment with the provisioned volume"
)
// The reason we use a node selector is because we do not want pod to move to different node when pod is deleted.
// Keeping pod on same node reproduces the scenario that volume might already be mounted when resize is attempted.
// We should consider adding a unit test that exercises this better.
By
(
"Creating a deployment with selected PVC"
)
deployment
,
err
:=
framework
.
CreateDeployment
(
c
,
int32
(
1
),
map
[
string
]
string
{
"test"
:
"app"
},
nodeKeyValueLabel
,
ns
,
pvcClaims
,
""
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Failed creating deployment %v"
,
err
)
defer
c
.
AppsV1
()
.
Deployments
(
ns
)
.
Delete
(
deployment
.
Name
,
&
metav1
.
DeleteOptions
{})
// PVC should be bound at this point
By
(
"Checking for bound PVC"
)
pvs
,
err
:=
framework
.
WaitForPVClaimBoundPhase
(
c
,
pvcClaims
,
framework
.
ClaimProvisionTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Failed waiting for PVC to be bound %v"
,
err
)
Expect
(
len
(
pvs
))
.
To
(
Equal
(
1
))
By
(
"Expanding current pvc"
)
newSize
:=
resource
.
MustParse
(
"6Gi"
)
pvc
,
err
=
expandPVCSize
(
pvc
,
newSize
,
c
)
...
...
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