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
220b5e3e
Commit
220b5e3e
authored
Feb 09, 2016
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make all e2e tests use Framework
parent
c1e79e42
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
52 deletions
+18
-52
cadvisor.go
test/e2e/cadvisor.go
+2
-7
monitoring.go
test/e2e/monitoring.go
+2
-6
namespace.go
test/e2e/namespace.go
+3
-13
restart.go
test/e2e/restart.go
+8
-17
ssh.go
test/e2e/ssh.go
+3
-9
No files found.
test/e2e/cadvisor.go
View file @
220b5e3e
...
...
@@ -32,16 +32,11 @@ const (
)
var
_
=
Describe
(
"Cadvisor"
,
func
()
{
var
c
*
client
.
Client
BeforeEach
(
func
()
{
var
err
error
c
,
err
=
loadClient
()
expectNoError
(
err
)
})
f
:=
NewFramework
(
"cadvisor"
)
It
(
"should be healthy on every node."
,
func
()
{
CheckCadvisorHealthOnAllNodes
(
c
,
5
*
time
.
Minute
)
CheckCadvisorHealthOnAllNodes
(
f
.
Client
,
5
*
time
.
Minute
)
})
})
...
...
test/e2e/monitoring.go
View file @
220b5e3e
...
...
@@ -33,18 +33,14 @@ import (
// TODO: quinton: debug issue #6541 and then remove Pending flag here.
var
_
=
Describe
(
"[Flaky] Monitoring"
,
func
()
{
var
c
*
client
.
Client
f
:=
NewFramework
(
"monitoring"
)
BeforeEach
(
func
()
{
var
err
error
c
,
err
=
loadClient
()
expectNoError
(
err
)
SkipUnlessProviderIs
(
"gce"
)
})
It
(
"should verify monitoring pods and all cluster nodes are available on influxdb using heapster."
,
func
()
{
testMonitoringUsingHeapsterInfluxdb
(
c
)
testMonitoringUsingHeapsterInfluxdb
(
f
.
Client
)
})
})
...
...
test/e2e/namespace.go
View file @
220b5e3e
...
...
@@ -105,22 +105,12 @@ func extinguish(c *client.Client, totalNS int, maxAllowedAfterDel int, maxSecond
// rate of approximately 1 per second.
var
_
=
Describe
(
"Namespaces [Serial]"
,
func
()
{
//This namespace is modified throughout the course of the test.
var
c
*
client
.
Client
var
err
error
=
nil
BeforeEach
(
func
()
{
By
(
"Creating a kubernetes client"
)
c
,
err
=
loadClient
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
AfterEach
(
func
()
{
})
f
:=
NewFramework
(
"namespaces"
)
It
(
"should delete fast enough (90 percent of 100 namespaces in 150 seconds)"
,
func
()
{
extinguish
(
c
,
100
,
10
,
150
)
})
func
()
{
extinguish
(
f
.
Client
,
100
,
10
,
150
)
})
// On hold until etcd3; see #7372
It
(
"should always delete fast (ALL of 100 namespaces in 150 seconds) [Feature:ComprehensiveNamespaceDraining]"
,
func
()
{
extinguish
(
c
,
100
,
0
,
150
)
})
func
()
{
extinguish
(
f
.
Client
,
100
,
0
,
150
)
})
})
test/e2e/restart.go
View file @
220b5e3e
...
...
@@ -49,37 +49,28 @@ const (
)
var
_
=
Describe
(
"Restart [Disruptive]"
,
func
()
{
var
c
*
client
.
Client
f
:=
NewFramework
(
"restart"
)
var
ps
*
podStore
var
skipped
bool
BeforeEach
(
func
()
{
var
err
error
c
,
err
=
loadClient
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
// This test requires the ability to restart all nodes, so the provider
// check must be identical to that call.
skipped
=
true
SkipUnlessProviderIs
(
"gce"
,
"gke"
)
skipped
=
false
ps
=
newPodStore
(
c
,
api
.
NamespaceSystem
,
labels
.
Everything
(),
fields
.
Everything
())
ps
=
newPodStore
(
f
.
Client
,
api
.
NamespaceSystem
,
labels
.
Everything
(),
fields
.
Everything
())
})
AfterEach
(
func
()
{
if
skipped
{
return
if
ps
!=
nil
{
ps
.
Stop
()
}
ps
.
Stop
()
})
It
(
"should restart all nodes and ensure all nodes and pods recover"
,
func
()
{
nn
:=
testContext
.
CloudConfig
.
NumNodes
By
(
"ensuring all nodes are ready"
)
nodeNamesBefore
,
err
:=
checkNodesReady
(
c
,
nodeReadyInitialTimeout
,
nn
)
nodeNamesBefore
,
err
:=
checkNodesReady
(
f
.
Client
,
nodeReadyInitialTimeout
,
nn
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Logf
(
"Got the following nodes before restart: %v"
,
nodeNamesBefore
)
...
...
@@ -90,7 +81,7 @@ var _ = Describe("Restart [Disruptive]", func() {
podNamesBefore
[
i
]
=
p
.
ObjectMeta
.
Name
}
ns
:=
api
.
NamespaceSystem
if
!
checkPodsRunningReady
(
c
,
ns
,
podNamesBefore
,
podReadyBeforeTimeout
)
{
if
!
checkPodsRunningReady
(
f
.
Client
,
ns
,
podNamesBefore
,
podReadyBeforeTimeout
)
{
Failf
(
"At least one pod wasn't running and ready at test start."
)
}
...
...
@@ -99,7 +90,7 @@ var _ = Describe("Restart [Disruptive]", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"ensuring all nodes are ready after the restart"
)
nodeNamesAfter
,
err
:=
checkNodesReady
(
c
,
restartNodeReadyAgainTimeout
,
nn
)
nodeNamesAfter
,
err
:=
checkNodesReady
(
f
.
Client
,
restartNodeReadyAgainTimeout
,
nn
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Logf
(
"Got the following nodes after restart: %v"
,
nodeNamesAfter
)
...
...
@@ -119,7 +110,7 @@ var _ = Describe("Restart [Disruptive]", func() {
podNamesAfter
,
err
:=
waitForNPods
(
ps
,
len
(
podNamesBefore
),
restartPodReadyAgainTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
remaining
:=
restartPodReadyAgainTimeout
-
time
.
Since
(
podCheckStart
)
if
!
checkPodsRunningReady
(
c
,
ns
,
podNamesAfter
,
remaining
)
{
if
!
checkPodsRunningReady
(
f
.
Client
,
ns
,
podNamesAfter
,
remaining
)
{
Failf
(
"At least one pod wasn't running and ready after the restart."
)
}
})
...
...
test/e2e/ssh.go
View file @
220b5e3e
...
...
@@ -20,20 +20,14 @@ import (
"fmt"
"strings"
client
"k8s.io/kubernetes/pkg/client/unversioned"
.
"github.com/onsi/ginkgo"
.
"github.com/onsi/gomega"
)
var
_
=
Describe
(
"SSH"
,
func
()
{
var
c
*
client
.
Client
BeforeEach
(
func
()
{
var
err
error
c
,
err
=
loadClient
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
f
:=
NewFramework
(
"ssh"
)
BeforeEach
(
func
()
{
// When adding more providers here, also implement their functionality in util.go's getSigner(...).
SkipUnlessProviderIs
(
providersWithSSH
...
)
})
...
...
@@ -41,7 +35,7 @@ var _ = Describe("SSH", func() {
It
(
"should SSH to all nodes and run commands"
,
func
()
{
// Get all nodes' external IPs.
By
(
"Getting all nodes' SSH-able IP addresses"
)
hosts
,
err
:=
NodeSSHHosts
(
c
)
hosts
,
err
:=
NodeSSHHosts
(
f
.
Client
)
if
err
!=
nil
{
Failf
(
"Error getting node hostnames: %v"
,
err
)
}
...
...
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