From ab87ce704c03759c4ae994501217f61da7b7d689 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:43:44 +0000 Subject: [PATCH 1/4] Bump github.com/smartystreets/goconvey from 1.8.0 to 1.8.1 Bumps [github.com/smartystreets/goconvey](https://github.com/smartystreets/goconvey) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/smartystreets/goconvey/releases) - [Commits](https://github.com/smartystreets/goconvey/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/smartystreets/goconvey dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index eb4ddb3f..3fc260cc 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/mattn/go-colorable v0.1.13 github.com/mitchellh/go-homedir v1.1.0 github.com/opencontainers/image-spec v1.1.0-rc5 - github.com/smartystreets/goconvey v1.8.0 + github.com/smartystreets/goconvey v1.8.1 github.com/spf13/cobra v1.2.1 github.com/spf13/viper v1.16.0 golang.org/x/crypto v0.14.0 @@ -39,7 +39,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/smartystreets/assertions v1.13.1 // indirect + github.com/smarty/assertions v1.15.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect diff --git a/go.sum b/go.sum index b8f2ef92..c39c14e8 100644 --- a/go.sum +++ b/go.sum @@ -41,6 +41,7 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -84,6 +85,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -140,6 +142,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -202,9 +205,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -258,18 +263,19 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU= -github.com/smartystreets/assertions v1.13.1/go.mod h1:cXr/IwVfSo/RbCSPhoAPv73p3hlSdrBH/b3SdnW/LMY= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.8.0 h1:Oi49ha/2MURE0WexF052Z0m+BNSGirfjg5RL+JXWq3w= -github.com/smartystreets/goconvey v1.8.0/go.mod h1:EdX8jtrTIj26jmjCOVNMVSIYAtgexqXKHOXW2Dx9JLg= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= @@ -431,6 +437,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -483,6 +490,7 @@ golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -498,6 +506,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= From defeb97547fe1859f49cb828d982e17b415ae82b Mon Sep 17 00:00:00 2001 From: Karl Hepworth Date: Wed, 1 Nov 2023 22:06:22 +1100 Subject: [PATCH 2/4] Update tests to match updated test framework api Signed-off-by: Karl Hepworth --- service/haproxy/haproxy_test.go | 2 +- service/mailhog/mailhog_test.go | 2 +- service/network/network_test.go | 2 +- service/ssh/agent/ssh_agent_test.go | 5 +++-- service/ssh/key/ssh_addkey_test.go | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/service/haproxy/haproxy_test.go b/service/haproxy/haproxy_test.go index 496bdba2..bcf64ca8 100644 --- a/service/haproxy/haproxy_test.go +++ b/service/haproxy/haproxy_test.go @@ -28,7 +28,7 @@ func Test(t *testing.T) { So(obj.Config.Labels["pygmy.weight"], ShouldEqual, "14") So(obj.HostConfig.AutoRemove, ShouldBeFalse) So(fmt.Sprint(obj.HostConfig.Binds), ShouldEqual, fmt.Sprint([]string{"/var/run/docker.sock:/tmp/docker.sock"})) - So(obj.HostConfig.PortBindings, ShouldEqual, nil) + So(obj.HostConfig.PortBindings, ShouldEqual, nat.PortMap(nil)) So(obj.HostConfig.RestartPolicy.Name, ShouldEqual, "unless-stopped") So(obj.HostConfig.RestartPolicy.MaximumRetryCount, ShouldEqual, 0) So(fmt.Sprint(objPorts.HostConfig.PortBindings), ShouldEqual, fmt.Sprint(nat.PortMap{"80/tcp": []nat.PortBinding{{HostIP: "", HostPort: "80"}}, "443/tcp": []nat.PortBinding{{HostIP: "", HostPort: "443"}}})) diff --git a/service/mailhog/mailhog_test.go b/service/mailhog/mailhog_test.go index f1ebcd2d..1b2eb1dd 100644 --- a/service/mailhog/mailhog_test.go +++ b/service/mailhog/mailhog_test.go @@ -30,7 +30,7 @@ func Test(t *testing.T) { So(obj.Config.Labels["pygmy.url"], ShouldEqual, "http://mailhog.docker.amazee.io") So(obj.Config.Labels["pygmy.weight"], ShouldEqual, "15") So(obj.HostConfig.AutoRemove, ShouldBeFalse) - So(obj.HostConfig.PortBindings, ShouldEqual, nil) + So(obj.HostConfig.PortBindings, ShouldEqual, nat.PortMap(nil)) So(obj.HostConfig.RestartPolicy.Name, ShouldEqual, "unless-stopped") So(obj.HostConfig.RestartPolicy.MaximumRetryCount, ShouldEqual, 0) So(fmt.Sprint(objPorts.HostConfig.PortBindings), ShouldEqual, fmt.Sprint(nat.PortMap{"1025/tcp": []nat.PortBinding{{HostIP: "", HostPort: "1025"}}})) diff --git a/service/network/network_test.go b/service/network/network_test.go index 7a9bf52d..a46bc82c 100644 --- a/service/network/network_test.go +++ b/service/network/network_test.go @@ -18,7 +18,7 @@ func Test(t *testing.T) { obj := n.New() So(obj.Name, ShouldEqual, "amazeeio-network") So(obj.IPAM.Driver, ShouldEqual, "") - So(obj.IPAM.Options, ShouldEqual, nil) + So(obj.IPAM.Options, ShouldEqual, map[string]string(nil)) So(fmt.Sprint(obj.IPAM.Config), ShouldEqual, fmt.Sprint([]network.IPAMConfig{{Subnet: "10.99.99.0/24", Gateway: "10.99.99.1"}})) So(fmt.Sprint(obj.Labels), ShouldEqual, fmt.Sprint(map[string]string{"pygmy.name": "amazeeio-network"})) }) diff --git a/service/ssh/agent/ssh_agent_test.go b/service/ssh/agent/ssh_agent_test.go index 2882217b..fe7a2d0f 100644 --- a/service/ssh/agent/ssh_agent_test.go +++ b/service/ssh/agent/ssh_agent_test.go @@ -1,6 +1,7 @@ package agent_test import ( + "github.com/docker/go-connections/nat" "testing" model "github.com/pygmystack/pygmy/service/interface" @@ -35,8 +36,8 @@ func Test(t *testing.T) { So(obj.Config.Labels["pygmy.purpose"], ShouldEqual, "sshagent") So(obj.Config.Labels["pygmy.weight"], ShouldEqual, "10") So(obj.HostConfig.AutoRemove, ShouldBeFalse) - So(obj.HostConfig.IpcMode, ShouldEqual, "private") - So(obj.HostConfig.PortBindings, ShouldEqual, nil) + So(obj.HostConfig.IpcMode.IsPrivate(), ShouldBeTrue) + So(obj.HostConfig.PortBindings, ShouldEqual, nat.PortMap(nil)) So(obj.HostConfig.RestartPolicy.Name, ShouldEqual, "unless-stopped") So(obj.HostConfig.RestartPolicy.MaximumRetryCount, ShouldEqual, 0) }) diff --git a/service/ssh/key/ssh_addkey_test.go b/service/ssh/key/ssh_addkey_test.go index 778d5970..ba914817 100644 --- a/service/ssh/key/ssh_addkey_test.go +++ b/service/ssh/key/ssh_addkey_test.go @@ -25,7 +25,7 @@ func TestAdd(t *testing.T) { So(obj.Config.Labels["pygmy.purpose"], ShouldEqual, "addkeys") So(obj.Config.Labels["pygmy.weight"], ShouldEqual, "31") So(obj.HostConfig.AutoRemove, ShouldBeFalse) - So(obj.HostConfig.IpcMode, ShouldEqual, "private") + So(obj.HostConfig.IpcMode.IsPrivate(), ShouldBeTrue) So(fmt.Sprint(obj.HostConfig.VolumesFrom), ShouldEqual, fmt.Sprint([]string{"amazeeio-ssh-agent"})) }) } From 03ea7fe83aeaa524e9159f5ed096334325dbb4c1 Mon Sep 17 00:00:00 2001 From: Karl Hepworth Date: Wed, 1 Nov 2023 22:07:31 +1100 Subject: [PATCH 3/4] goimports Signed-off-by: Karl Hepworth --- service/ssh/agent/ssh_agent_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/ssh/agent/ssh_agent_test.go b/service/ssh/agent/ssh_agent_test.go index fe7a2d0f..72b674e9 100644 --- a/service/ssh/agent/ssh_agent_test.go +++ b/service/ssh/agent/ssh_agent_test.go @@ -1,9 +1,10 @@ package agent_test import ( - "github.com/docker/go-connections/nat" "testing" + "github.com/docker/go-connections/nat" + model "github.com/pygmystack/pygmy/service/interface" "github.com/pygmystack/pygmy/service/ssh/agent" . "github.com/smartystreets/goconvey/convey" From 5d50e5d423fec920f43163e3391f4ccd6eafa13e Mon Sep 17 00:00:00 2001 From: Karl Hepworth Date: Wed, 1 Nov 2023 22:19:04 +1100 Subject: [PATCH 4/4] update dnsmasq test for goconvey update compatability Signed-off-by: Karl Hepworth --- service/dnsmasq/dnsmasq_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/dnsmasq/dnsmasq_test.go b/service/dnsmasq/dnsmasq_test.go index e071eeba..601ceaa7 100644 --- a/service/dnsmasq/dnsmasq_test.go +++ b/service/dnsmasq/dnsmasq_test.go @@ -26,7 +26,7 @@ func Test(t *testing.T) { So(obj.Config.Labels["pygmy.weight"], ShouldEqual, "13") So(obj.HostConfig.AutoRemove, ShouldBeFalse) So(fmt.Sprint(obj.HostConfig.CapAdd), ShouldEqual, fmt.Sprint([]string{"NET_ADMIN"})) - So(obj.HostConfig.IpcMode, ShouldEqual, "private") + So(obj.HostConfig.IpcMode.IsPrivate(), ShouldBeTrue) So(fmt.Sprint(obj.HostConfig.PortBindings), ShouldEqual, fmt.Sprint(nat.PortMap{"53/tcp": []nat.PortBinding{{HostIP: "", HostPort: "6053"}}, "53/udp": []nat.PortBinding{{HostIP: "", HostPort: "6053"}}})) So(obj.HostConfig.RestartPolicy.Name, ShouldEqual, "unless-stopped") So(obj.HostConfig.RestartPolicy.MaximumRetryCount, ShouldBeZeroValue)