Error check for waitForEndoint in e2e examples tests

pull/6/head
Marcin Wielgus 2015-10-06 13:16:20 +02:00
parent bc61bcc1ad
commit 555cc5e579
1 changed files with 16 additions and 8 deletions

View File

@ -148,7 +148,8 @@ var _ = Describe("Examples e2e", func() {
_, err := lookForStringInLog(ns, pod.Name, "rabbitmq", "Server startup complete", serverStartTimeout)
Expect(err).NotTo(HaveOccurred())
})
waitForEndpoint(c, ns, "rabbitmq-service")
err := waitForEndpoint(c, ns, "rabbitmq-service")
Expect(err).NotTo(HaveOccurred())
By("starting celery")
runKubectl("create", "-f", celeryControllerYaml, nsFlag)
@ -194,7 +195,8 @@ var _ = Describe("Examples e2e", func() {
Expect(err).NotTo(HaveOccurred())
By("waiting for master endpoint")
waitForEndpoint(c, ns, "spark-master")
err = waitForEndpoint(c, ns, "spark-master")
Expect(err).NotTo(HaveOccurred())
By("starting workers")
runKubectl("create", "-f", workerControllerJson, nsFlag)
@ -225,7 +227,8 @@ var _ = Describe("Examples e2e", func() {
_, err = lookForStringInLog(ns, "cassandra", "cassandra", "Listening for thrift clients", serverStartTimeout)
Expect(err).NotTo(HaveOccurred())
waitForEndpoint(c, ns, "cassandra")
err = waitForEndpoint(c, ns, "cassandra")
Expect(err).NotTo(HaveOccurred())
By("create and scale rc")
runKubectl("create", "-f", controllerYaml, nsFlag)
@ -269,14 +272,17 @@ var _ = Describe("Examples e2e", func() {
By("checking if zookeeper is up and running")
_, err = lookForStringInLog(ns, zookeeperPod, "zookeeper", "binding to port", serverStartTimeout)
Expect(err).NotTo(HaveOccurred())
waitForEndpoint(c, ns, "zookeeper")
err = waitForEndpoint(c, ns, "zookeeper")
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())
waitForEndpoint(c, ns, "nimbus")
err = waitForEndpoint(c, ns, "nimbus")
Expect(err).NotTo(HaveOccurred())
By("starting workers")
runKubectl("create", "-f", workerControllerJson, nsFlag)
@ -390,7 +396,8 @@ var _ = Describe("Examples e2e", func() {
})
}
checkDbInstances()
waitForEndpoint(c, ns, "rethinkdb-driver")
err := waitForEndpoint(c, ns, "rethinkdb-driver")
Expect(err).NotTo(HaveOccurred())
By("scaling rethinkdb")
ScaleRC(c, ns, "rethinkdb-rc", 2, true)
@ -399,7 +406,7 @@ var _ = Describe("Examples e2e", func() {
By("starting admin")
runKubectl("create", "-f", adminServiceYaml, nsFlag)
runKubectl("create", "-f", adminPodYaml, nsFlag)
err := waitForPodRunningInNamespace(c, "rethinkdb-admin", ns)
err = waitForPodRunningInNamespace(c, "rethinkdb-admin", ns)
Expect(err).NotTo(HaveOccurred())
checkDbInstances()
content, err := makeHttpRequestToService(c, ns, "rethinkdb-admin", "/", endpointRegisterTimeout)
@ -429,7 +436,8 @@ var _ = Describe("Examples e2e", func() {
Expect(err).NotTo(HaveOccurred())
})
waitForEndpoint(c, ns, "hazelcast")
err := waitForEndpoint(c, ns, "hazelcast")
Expect(err).NotTo(HaveOccurred())
By("scaling hazelcast")
ScaleRC(c, ns, "hazelcast", 2, true)