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
090f7381
Commit
090f7381
authored
Feb 07, 2025
by
Derek Nola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error checks around FetchIngressIP
Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
09c044d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
testutils.go
tests/e2e/testutils.go
+3
-0
wasm_test.go
tests/e2e/wasm/wasm_test.go
+7
-3
No files found.
tests/e2e/testutils.go
View file @
090f7381
...
@@ -350,6 +350,9 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
...
@@ -350,6 +350,9 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
}
}
ingressIP
:=
strings
.
Trim
(
res
,
" "
)
ingressIP
:=
strings
.
Trim
(
res
,
" "
)
ingressIPs
:=
strings
.
Split
(
ingressIP
,
" "
)
ingressIPs
:=
strings
.
Split
(
ingressIP
,
" "
)
if
len
(
ingressIPs
)
==
0
{
return
nil
,
errors
.
New
(
"no ingress IP found"
)
}
return
ingressIPs
,
nil
return
ingressIPs
,
nil
}
}
...
...
tests/e2e/wasm/wasm_test.go
View file @
090f7381
...
@@ -97,9 +97,13 @@ var _ = Describe("Verify K3s can run Wasm workloads", Ordered, func() {
...
@@ -97,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
{
...
...
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