Commit 45dbc43b authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Fix e2e ingress IP helper

parent 20a9a6bf
...@@ -348,9 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) { ...@@ -348,9 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
ingressIP := strings.Trim(res, " ") res = strings.TrimSpace(res)
ingressIPs := strings.Split(ingressIP, " ") if res == "" {
return ingressIPs, nil return nil, errors.New("no ingress IPs found")
}
return strings.Split(res, " "), nil
} }
func (v VagrantNode) FetchNodeExternalIP() (string, error) { func (v VagrantNode) FetchNodeExternalIP() (string, error) {
......
...@@ -59,6 +59,9 @@ var _ = Describe("Verify K3s can run Wasm workloads", Ordered, func() { ...@@ -59,6 +59,9 @@ var _ = Describe("Verify K3s can run Wasm workloads", Ordered, func() {
Eventually(func() error { Eventually(func() error {
return tests.AllPodsUp(tc.KubeConfigFile) return tests.AllPodsUp(tc.KubeConfigFile)
}, "620s", "10s").Should(Succeed()) }, "620s", "10s").Should(Succeed())
Eventually(func() error {
return tests.CheckDefaultDeployments(tc.KubeConfigFile)
}, "300s", "10s").Should(Succeed())
}) })
It("Verify wasm-related containerd shims are installed", func() { It("Verify wasm-related containerd shims are installed", func() {
...@@ -94,9 +97,13 @@ var _ = Describe("Verify K3s can run Wasm workloads", Ordered, func() { ...@@ -94,9 +97,13 @@ var _ = Describe("Verify K3s can run Wasm workloads", Ordered, func() {
}) })
It("Interact with Wasm applications", func() { It("Interact with Wasm applications", func() {
ingressIPs, err := e2e.FetchIngressIP(tc.KubeConfigFile) var ingressIPs []string
Expect(err).NotTo(HaveOccurred()) var err error
Expect(ingressIPs).To(HaveLen(1)) Eventually(func(g Gomega) {
ingressIPs, err = e2e.FetchIngressIP(tc.KubeConfigFile)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(ingressIPs).To(HaveLen(1))
}, "120s", "5s").Should(Succeed())
endpoints := []string{"slight/hello", "spin/go-hello", "spin/hello"} endpoints := []string{"slight/hello", "spin/go-hello", "spin/hello"}
for _, endpoint := range endpoints { for _, endpoint := range endpoints {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment