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
3d82de84
Commit
3d82de84
authored
Jul 03, 2015
by
Marcin Wielgus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E test for examples/storm
parent
db2d4a2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
4 deletions
+53
-4
README.md
examples/storm/README.md
+1
-2
storm-worker-controller.json
examples/storm/storm-worker-controller.json
+1
-1
e2e_test.go
test/e2e/e2e_test.go
+1
-1
examples.go
test/e2e/examples.go
+50
-0
No files found.
examples/storm/README.md
View file @
3d82de84
...
@@ -166,12 +166,11 @@ Clients:
...
@@ -166,12 +166,11 @@ Clients:
/192.168.45.0:39568[1]
(
queued
=
0,recved
=
14072,sent
=
14072
)
/192.168.45.0:39568[1]
(
queued
=
0,recved
=
14072,sent
=
14072
)
/192.168.86.1:57591[1]
(
queued
=
0,recved
=
34,sent
=
34
)
/192.168.86.1:57591[1]
(
queued
=
0,recved
=
34,sent
=
34
)
/192.168.8.0:50375[1]
(
queued
=
0,recved
=
34,sent
=
34
)
/192.168.8.0:50375[1]
(
queued
=
0,recved
=
34,sent
=
34
)
/192.168.45.0:39576[1]
(
queued
=
0,recved
=
34,sent
=
34
)
Latency min/avg/max: 0/2/2570
Latency min/avg/max: 0/2/2570
Received: 23199
Received: 23199
Sent: 23198
Sent: 23198
Connections:
5
Connections:
4
Outstanding: 0
Outstanding: 0
Zxid: 0xa39
Zxid: 0xa39
Mode: standalone
Mode: standalone
...
...
examples/storm/storm-worker-controller.json
View file @
3d82de84
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
}
}
},
},
"spec"
:
{
"spec"
:
{
"replicas"
:
3
,
"replicas"
:
2
,
"selector"
:
{
"selector"
:
{
"name"
:
"storm-worker"
"name"
:
"storm-worker"
},
},
...
...
test/e2e/e2e_test.go
View file @
3d82de84
...
@@ -116,7 +116,7 @@ func TestE2E(t *testing.T) {
...
@@ -116,7 +116,7 @@ func TestE2E(t *testing.T) {
}
}
}
}
// Disable
density test unless it's
explicitly requested.
// Disable
skipped tests unless they are
explicitly requested.
if
config
.
GinkgoConfig
.
FocusString
==
""
&&
config
.
GinkgoConfig
.
SkipString
==
""
{
if
config
.
GinkgoConfig
.
FocusString
==
""
&&
config
.
GinkgoConfig
.
SkipString
==
""
{
config
.
GinkgoConfig
.
SkipString
=
"Skipped"
config
.
GinkgoConfig
.
SkipString
=
"Skipped"
}
}
...
...
test/e2e/examples.go
View file @
3d82de84
...
@@ -224,6 +224,56 @@ var _ = Describe("Examples e2e", func() {
...
@@ -224,6 +224,56 @@ var _ = Describe("Examples e2e", func() {
})
})
})
})
})
})
Describe
(
"[Skipped][Example]Storm"
,
func
()
{
It
(
"should create and stop Zookeeper, Nimbus and Storm worker servers"
,
func
()
{
mkpath
:=
func
(
file
string
)
string
{
return
filepath
.
Join
(
testContext
.
RepoRoot
,
"examples"
,
"storm"
,
file
)
}
zookeeperServiceJson
:=
mkpath
(
"zookeeper-service.json"
)
zookeeperPodJson
:=
mkpath
(
"zookeeper.json"
)
nimbusServiceJson
:=
mkpath
(
"storm-nimbus-service.json"
)
nimbusPodJson
:=
mkpath
(
"storm-nimbus.json"
)
workerControllerJson
:=
mkpath
(
"storm-worker-controller.json"
)
nsFlag
:=
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
)
zookeeperPod
:=
"zookeeper"
By
(
"starting Zookeeper"
)
runKubectl
(
"create"
,
"-f"
,
zookeeperPodJson
,
nsFlag
)
runKubectl
(
"create"
,
"-f"
,
zookeeperServiceJson
,
nsFlag
)
err
:=
waitForPodRunningInNamespace
(
c
,
zookeeperPod
,
ns
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"checking if zookeeper is up and running"
)
_
,
err
=
lookForStringInLog
(
ns
,
zookeeperPod
,
"zookeeper"
,
"binding to port"
,
serverStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"starting Nimbus"
)
runKubectl
(
"create"
,
"-f"
,
nimbusPodJson
,
nsFlag
)
runKubectl
(
"create"
,
"-f"
,
nimbusServiceJson
,
nsFlag
)
err
=
waitForPodRunningInNamespace
(
c
,
"nimbus"
,
ns
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"starting workers"
)
runKubectl
(
"create"
,
"-f"
,
workerControllerJson
,
nsFlag
)
forEachPod
(
c
,
ns
,
"name"
,
"storm-worker"
,
func
(
pod
api
.
Pod
)
{
//do nothing, just wait for the pod to be running
})
// TODO: Add logging configuration to nimbus & workers images and then
// look for a string instead of sleeping.
time
.
Sleep
(
20
*
time
.
Second
)
By
(
"checking if there are established connections to Zookeeper"
)
_
,
err
=
lookForStringInLog
(
ns
,
zookeeperPod
,
"zookeeper"
,
"Established session"
,
serverStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
By
(
"checking if Nimbus responds to requests"
)
lookForString
(
"No topologies running."
,
time
.
Minute
,
func
()
string
{
return
runKubectl
(
"exec"
,
"nimbus"
,
nsFlag
,
"--"
,
"bin/storm"
,
"list"
)
})
})
})
})
})
func
makeHttpRequestToService
(
c
*
client
.
Client
,
ns
,
service
,
path
string
)
(
string
,
error
)
{
func
makeHttpRequestToService
(
c
*
client
.
Client
,
ns
,
service
,
path
string
)
(
string
,
error
)
{
...
...
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