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
3c71eb65
Commit
3c71eb65
authored
Jul 10, 2015
by
Rohit Jnagal
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11068 from alex-mohr/e2e-gke
Add GKE coverage for e2e tests that support both GCE and GKE
parents
6dc16f94
a8851668
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
pd.go
test/e2e/pd.go
+7
-6
reboot.go
test/e2e/reboot.go
+2
-2
restart.go
test/e2e/restart.go
+2
-2
No files found.
test/e2e/pd.go
View file @
3c71eb65
...
...
@@ -60,7 +60,7 @@ var _ = Describe("Pod Disks", func() {
})
It
(
"should schedule a pod w/ a RW PD, remove it, then schedule it on another host"
,
func
()
{
SkipUnlessProviderIs
(
"gce"
,
"aws"
)
SkipUnlessProviderIs
(
"gce"
,
"
gke"
,
"
aws"
)
By
(
"creating PD"
)
diskName
,
err
:=
createPD
()
...
...
@@ -113,7 +113,7 @@ var _ = Describe("Pod Disks", func() {
})
It
(
"should schedule a pod w/ a readonly PD on two hosts, then remove both."
,
func
()
{
SkipUnlessProviderIs
(
"gce"
)
SkipUnlessProviderIs
(
"gce"
,
"gke"
)
By
(
"creating PD"
)
diskName
,
err
:=
createPD
()
...
...
@@ -166,6 +166,7 @@ var _ = Describe("Pod Disks", func() {
Logf
(
"Couldn't delete PD. Sleeping 5 seconds"
)
continue
}
Logf
(
"Successfully deleted PD %q"
,
diskName
)
break
}
expectNoError
(
err
,
"Error deleting PD"
)
...
...
@@ -173,7 +174,7 @@ var _ = Describe("Pod Disks", func() {
})
func
createPD
()
(
string
,
error
)
{
if
testContext
.
Provider
==
"gce"
{
if
testContext
.
Provider
==
"gce"
||
testContext
.
Provider
==
"gke"
{
pdName
:=
fmt
.
Sprintf
(
"%s-%s"
,
testContext
.
prefix
,
string
(
util
.
NewUUID
()))
zone
:=
testContext
.
CloudConfig
.
Zone
...
...
@@ -195,7 +196,7 @@ func createPD() (string, error) {
}
func
deletePD
(
pdName
string
)
error
{
if
testContext
.
Provider
==
"gce"
{
if
testContext
.
Provider
==
"gce"
||
testContext
.
Provider
==
"gke"
{
zone
:=
testContext
.
CloudConfig
.
Zone
// TODO: make this hit the compute API directly.
...
...
@@ -215,7 +216,7 @@ func deletePD(pdName string) error {
}
func
detachPD
(
hostName
,
pdName
string
)
error
{
if
testContext
.
Provider
==
"gce"
{
if
testContext
.
Provider
==
"gce"
||
testContext
.
Provider
==
"gke"
{
instanceName
:=
strings
.
Split
(
hostName
,
"."
)[
0
]
zone
:=
testContext
.
CloudConfig
.
Zone
...
...
@@ -257,7 +258,7 @@ func testPDPod(diskName, targetHost string, readOnly bool) *api.Pod {
},
}
if
testContext
.
Provider
==
"gce"
{
if
testContext
.
Provider
==
"gce"
||
testContext
.
Provider
==
"gke"
{
pod
.
Spec
.
Volumes
=
[]
api
.
Volume
{
{
Name
:
"testpd"
,
...
...
test/e2e/reboot.go
View file @
3c71eb65
...
...
@@ -51,11 +51,11 @@ var _ = Describe("Reboot", func() {
c
,
err
=
loadClient
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// These tests requires SSH, so the provider check should be identical to there
// These tests requires SSH
to nodes
, so the provider check should be identical to there
// (the limiting factor is the implementation of util.go's getSigner(...)).
// Cluster must support node reboot
SkipUnlessProviderIs
(
"gce"
,
"aws"
)
SkipUnlessProviderIs
(
"gce"
,
"
gke"
,
"
aws"
)
})
It
(
"each node by ordering clean reboot and ensure they function upon restart"
,
func
()
{
...
...
test/e2e/restart.go
View file @
3c71eb65
...
...
@@ -61,7 +61,7 @@ var _ = Describe("Restart", func() {
// This test requires the ability to restart all nodes, so the provider
// check must be identical to that call.
skipped
=
true
SkipUnlessProviderIs
(
"gce"
)
SkipUnlessProviderIs
(
"gce"
,
"gke"
)
skipped
=
false
ps
=
newPodStore
(
c
,
api
.
NamespaceDefault
,
labels
.
Everything
(),
fields
.
Everything
())
...
...
@@ -214,7 +214,7 @@ func checkNodesReady(c *client.Client, nt time.Duration, expect int) ([]string,
// allowing up to nt per node.
func
restartNodes
(
provider
string
,
nt
time
.
Duration
)
error
{
switch
provider
{
case
"gce"
:
case
"gce"
,
"gke"
:
return
migRollingUpdateSelf
(
nt
)
default
:
return
fmt
.
Errorf
(
"restartNodes(...) not implemented for %s"
,
provider
)
...
...
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