Skip to content

Commit

Permalink
fix: skip IPv6 custom network test when pool fails
Browse files Browse the repository at this point in the history
Signed-off-by: thediveo <[email protected]>
  • Loading branch information
thediveo committed Jul 25, 2024
1 parent cf5185e commit 89d0bc2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions container_published_port_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
context "context"
io "io"
"net/http"
"strings"

"github.com/thediveo/morbyd/net"
"github.com/thediveo/morbyd/run"
Expand Down Expand Up @@ -84,8 +85,11 @@ var _ = Describe("published container ports", Ordered, func() {
session.WithAutoCleaning("test.morbyd=container.portv6")))
DeferCleanup(func(ctx context.Context) { sess.Close(ctx) })

v6net := Successful(sess.CreateNetwork(ctx, "morbyd-v6notwork",
net.WithIPv6()))
v6net, err := sess.CreateNetwork(ctx, "morbyd-v6notwork",
net.WithIPv6())
if err != nil && strings.Contains(err.Error(), "could not find an available, non-overlapping IPv6 address pool among the defaults") {
Skip("needs IPv6 pools for custom Docker networks")
}

By("spinning up an http serving busybox with published ports")
cntr := Successful(sess.Run(ctx,
Expand Down

0 comments on commit 89d0bc2

Please sign in to comment.