From 46cf72abc7a70529a1c372ad0f265f82f324af1e Mon Sep 17 00:00:00 2001 From: dalekliuhan Date: Fri, 20 Aug 2021 17:54:17 +0800 Subject: [PATCH] verify the ip address is not empty --- docker_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker_test.go b/docker_test.go index ebbf122680..011e16b85f 100644 --- a/docker_test.go +++ b/docker_test.go @@ -1513,9 +1513,13 @@ func TestGetGatewayIP(t *testing.T) { if err != nil { t.Fatal(err) } - if _, err := provider.GetGatewayIP(context.Background()); err != nil { + ip, err := provider.GetGatewayIP(context.Background()) + if err != nil { t.Fatal(err) } + if ip == "" { + t.Fatal("could not get gateway ip") + } } func randomString() string {