Skip to content

Commit

Permalink
verify the ip address is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dalekliuhan committed Aug 20, 2021
1 parent 0963bdd commit 46cf72a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 46cf72a

Please sign in to comment.