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