diff --git a/cli/command/container/attach_test.go b/cli/command/container/attach_test.go index 9f7831ca06..e8f6da29aa 100644 --- a/cli/command/container/attach_test.go +++ b/cli/command/container/attach_test.go @@ -100,7 +100,7 @@ func TestGetExitStatus(t *testing.T) { }, { result: &container.ContainerWaitOKBody{ - Error: &container.ContainerWaitOKBodyError{expectedErr.Error()}, + Error: &container.ContainerWaitOKBodyError{Message: expectedErr.Error()}, }, expectedError: expectedErr, }, diff --git a/cli/command/formatter/checkpoint_test.go b/cli/command/formatter/checkpoint_test.go index 26c517d580..b91748044b 100644 --- a/cli/command/formatter/checkpoint_test.go +++ b/cli/command/formatter/checkpoint_test.go @@ -38,9 +38,9 @@ checkpoint-3: } checkpoints := []types.Checkpoint{ - {"checkpoint-1"}, - {"checkpoint-2"}, - {"checkpoint-3"}, + {Name: "checkpoint-1"}, + {Name: "checkpoint-2"}, + {Name: "checkpoint-3"}, } for _, testcase := range cases { out := bytes.NewBufferString("") diff --git a/cli/command/formatter/diff_test.go b/cli/command/formatter/diff_test.go index c1f6650beb..dd104aecc7 100644 --- a/cli/command/formatter/diff_test.go +++ b/cli/command/formatter/diff_test.go @@ -42,9 +42,9 @@ D: /usr/app/old_app.js } diffs := []container.ContainerChangeResponseItem{ - {archive.ChangeModify, "/var/log/app.log"}, - {archive.ChangeAdd, "/usr/app/app.js"}, - {archive.ChangeDelete, "/usr/app/old_app.js"}, + {Kind: archive.ChangeModify, Path: "/var/log/app.log"}, + {Kind: archive.ChangeAdd, Path: "/usr/app/app.js"}, + {Kind: archive.ChangeDelete, Path: "/usr/app/old_app.js"}, } for _, testcase := range cases { diff --git a/cli/command/network/connect_test.go b/cli/command/network/connect_test.go index d4c9654eaf..e4a96e90a8 100644 --- a/cli/command/network/connect_test.go +++ b/cli/command/network/connect_test.go @@ -46,10 +46,10 @@ func TestNetworkConnectErrors(t *testing.T) { func TestNetworkConnectWithFlags(t *testing.T) { expectedOpts := []network.IPAMConfig{ { - "192.168.4.0/24", - "192.168.4.0/24", - "192.168.4.1/24", - map[string]string{}, + Subnet: "192.168.4.0/24", + IPRange: "192.168.4.0/24", + Gateway: "192.168.4.1/24", + AuxAddress: map[string]string{}, }, } cli := test.NewFakeCli(&fakeClient{ diff --git a/cli/command/network/create_test.go b/cli/command/network/create_test.go index 6a76695c91..5d52a3078b 100644 --- a/cli/command/network/create_test.go +++ b/cli/command/network/create_test.go @@ -146,10 +146,10 @@ func TestNetworkCreateWithFlags(t *testing.T) { expectedDriver := "foo" expectedOpts := []network.IPAMConfig{ { - "192.168.4.0/24", - "192.168.4.0/24", - "192.168.4.1/24", - map[string]string{}, + Subnet: "192.168.4.0/24", + IPRange: "192.168.4.0/24", + Gateway: "192.168.4.1/24", + AuxAddress: map[string]string{}, }, } cli := test.NewFakeCli(&fakeClient{ diff --git a/cli/command/service/opts_test.go b/cli/command/service/opts_test.go index a84072382b..0ef8ff9e2f 100644 --- a/cli/command/service/opts_test.go +++ b/cli/command/service/opts_test.go @@ -55,9 +55,9 @@ func TestHealthCheckOptionsToHealthConfig(t *testing.T) { dur := time.Second opt := healthCheckOptions{ cmd: "curl", - interval: opts.PositiveDurationOpt{*opts.NewDurationOpt(&dur)}, - timeout: opts.PositiveDurationOpt{*opts.NewDurationOpt(&dur)}, - startPeriod: opts.PositiveDurationOpt{*opts.NewDurationOpt(&dur)}, + interval: opts.PositiveDurationOpt{DurationOpt: *opts.NewDurationOpt(&dur)}, + timeout: opts.PositiveDurationOpt{DurationOpt: *opts.NewDurationOpt(&dur)}, + startPeriod: opts.PositiveDurationOpt{DurationOpt: *opts.NewDurationOpt(&dur)}, retries: 10, } config, err := opt.toHealthConfig() diff --git a/cli/command/stack/kubernetes/conversion_test.go b/cli/command/stack/kubernetes/conversion_test.go index 4c61ab3e4c..abc4163e52 100644 --- a/cli/command/stack/kubernetes/conversion_test.go +++ b/cli/command/stack/kubernetes/conversion_test.go @@ -50,8 +50,8 @@ func TestKubernetesServiceToSwarmServiceConversion(t *testing.T) { makeSwarmService("stack_service2", "uid2", nil), }, map[string]formatter.ServiceListInfo{ - "uid1": {"replicated", "2/5"}, - "uid2": {"replicated", "3/3"}, + "uid1": {Mode: "replicated", Replicas: "2/5"}, + "uid2": {Mode: "replicated", Replicas: "3/3"}, }, }, // Headless service and LoadBalancer Service are tied to the same Swarm service @@ -84,7 +84,7 @@ func TestKubernetesServiceToSwarmServiceConversion(t *testing.T) { }), }, map[string]formatter.ServiceListInfo{ - "uid1": {"replicated", "1/1"}, + "uid1": {Mode: "replicated", Replicas: "1/1"}, }, }, // Headless service and NodePort Service are tied to the same Swarm service @@ -118,7 +118,7 @@ func TestKubernetesServiceToSwarmServiceConversion(t *testing.T) { }), }, map[string]formatter.ServiceListInfo{ - "uid1": {"replicated", "1/1"}, + "uid1": {Mode: "replicated", Replicas: "1/1"}, }, }, } diff --git a/cli/command/trust/inspect_pretty_test.go b/cli/command/trust/inspect_pretty_test.go index bc2ea67928..5db01666b7 100644 --- a/cli/command/trust/inspect_pretty_test.go +++ b/cli/command/trust/inspect_pretty_test.go @@ -189,7 +189,7 @@ func mockDelegationRoleWithName(name string) data.DelegationRole { data.RoleName(name), notary.MinThreshold, ) - return data.DelegationRole{baseRole, []string{}} + return data.DelegationRole{BaseRole: baseRole, Paths: []string{}} } func TestMatchEmptySignatures(t *testing.T) {