From 89d0bc26f2768148c70c2441b742b16b07f9b436 Mon Sep 17 00:00:00 2001 From: thediveo Date: Thu, 25 Jul 2024 09:54:23 +0200 Subject: [PATCH] fix: skip IPv6 custom network test when pool fails Signed-off-by: thediveo --- container_published_port_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/container_published_port_test.go b/container_published_port_test.go index 872f1f0..804f0ef 100644 --- a/container_published_port_test.go +++ b/container_published_port_test.go @@ -18,6 +18,7 @@ import ( context "context" io "io" "net/http" + "strings" "github.com/thediveo/morbyd/net" "github.com/thediveo/morbyd/run" @@ -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,