mirror of https://github.com/k3s-io/k3s
E2E tests for examples/hazelcast
parent
7cc1855c27
commit
02b431da46
|
@ -384,6 +384,34 @@ var _ = Describe("Examples e2e", func() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Describe("[Skipped][Example]Hazelcast", func() {
|
||||||
|
It("should create and scale hazelcast", func() {
|
||||||
|
mkpath := func(file string) string {
|
||||||
|
return filepath.Join(testContext.RepoRoot, "examples", "hazelcast", file)
|
||||||
|
}
|
||||||
|
serviceYaml := mkpath("hazelcast-service.yaml")
|
||||||
|
controllerYaml := mkpath("hazelcast-controller.yaml")
|
||||||
|
nsFlag := fmt.Sprintf("--namespace=%v", ns)
|
||||||
|
|
||||||
|
By("starting hazelcast")
|
||||||
|
runKubectl("create", "-f", serviceYaml, nsFlag)
|
||||||
|
runKubectl("create", "-f", controllerYaml, nsFlag)
|
||||||
|
forEachPod(c, ns, "name", "hazelcast", func(pod api.Pod) {
|
||||||
|
_, err := lookForStringInLog(ns, pod.Name, "hazelcast", "Members [1]", serverStartTimeout)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
_, err = lookForStringInLog(ns, pod.Name, "hazelcast", "is STARTED", serverStartTimeout)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
})
|
||||||
|
|
||||||
|
By("scaling hazelcast")
|
||||||
|
ScaleRC(c, ns, "hazelcast", 2)
|
||||||
|
forEachPod(c, ns, "name", "hazelcast", func(pod api.Pod) {
|
||||||
|
_, err := lookForStringInLog(ns, pod.Name, "hazelcast", "Members [2]", serverStartTimeout)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
func makeHttpRequestToService(c *client.Client, ns, service, path string) (string, error) {
|
func makeHttpRequestToService(c *client.Client, ns, service, path string) (string, error) {
|
||||||
|
|
Loading…
Reference in New Issue