Skip to content

Commit

Permalink
added test for spark driver too
Browse files Browse the repository at this point in the history
  • Loading branch information
gurvindersingh committed Jul 30, 2015
1 parent f64d89f commit e1d76d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func TestExampleObjectSchemas(t *testing.T) {
"spark-master-service": &api.Service{},
"spark-master": &api.Pod{},
"spark-worker-controller": &api.ReplicationController{},
"spark-driver": &api.Pod{},
},
"../examples/storm": {
"storm-nimbus-service": &api.Service{},
Expand Down
6 changes: 5 additions & 1 deletion test/e2e/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,26 @@ var _ = Describe("Examples e2e", func() {
})

Describe("[Skipped][Example]Spark", func() {
It("should start spark master and workers", func() {
It("should start spark master, driver and workers", func() {
mkpath := func(file string) string {
return filepath.Join(testContext.RepoRoot, "examples", "spark", file)
}
serviceJson := mkpath("spark-master-service.json")
masterJson := mkpath("spark-master.json")
driverJson := mkpath("spark-driver.json")
workerControllerJson := mkpath("spark-worker-controller.json")
nsFlag := fmt.Sprintf("--namespace=%v", ns)

By("starting master")
runKubectl("create", "-f", serviceJson, nsFlag)
runKubectl("create", "-f", masterJson, nsFlag)
runKubectl("create", "-f", driverJson, nsFlag)
err := waitForPodRunningInNamespace(c, "spark-master", ns)
Expect(err).NotTo(HaveOccurred())
_, err = lookForStringInLog(ns, "spark-master", "spark-master", "Starting Spark master at", serverStartTimeout)
Expect(err).NotTo(HaveOccurred())
_, err = lookForStringInLog(ns, "spark-driver", "spark-driver", "Starting Spark driver at", serverStartTimeout)
Expect(err).NotTo(HaveOccurred())

By("starting workers")
runKubectl("create", "-f", workerControllerJson, nsFlag)
Expand Down

0 comments on commit e1d76d5

Please sign in to comment.