From 61480f41dc111f3de1acf0222c4a17709682adf1 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 31 Aug 2018 11:54:12 +0200 Subject: [PATCH] fix some go vet issues in tests ( composite literal uses unkeyed fields ) --- builder/docker/communicator_test.go | 18 +++++++++--------- provisioner/ansible-local/provisioner_test.go | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/builder/docker/communicator_test.go b/builder/docker/communicator_test.go index 14bcdf496..bf4cf76d7 100644 --- a/builder/docker/communicator_test.go +++ b/builder/docker/communicator_test.go @@ -68,8 +68,8 @@ func TestUploadDownload(t *testing.T) { hooks[packer.HookProvision] = []packer.Hook{ &packer.ProvisionHook{ Provisioners: []*packer.HookedProvisioner{ - {upload, nil, ""}, - {download, nil, ""}, + {Provisioner: upload, Config: nil, TypeName: ""}, + {Provisioner: download, Config: nil, TypeName: ""}, }, }, } @@ -157,9 +157,9 @@ func TestLargeDownload(t *testing.T) { hooks[packer.HookProvision] = []packer.Hook{ &packer.ProvisionHook{ Provisioners: []*packer.HookedProvisioner{ - {shell, nil, ""}, - {downloadCupcake, nil, ""}, - {downloadBigcake, nil, ""}, + {Provisioner: shell, Config: nil, TypeName: ""}, + {Provisioner: downloadCupcake, Config: nil, TypeName: ""}, + {Provisioner: downloadBigcake, Config: nil, TypeName: ""}, }, }, } @@ -266,10 +266,10 @@ func TestFixUploadOwner(t *testing.T) { hooks[packer.HookProvision] = []packer.Hook{ &packer.ProvisionHook{ Provisioners: []*packer.HookedProvisioner{ - {fileProvisioner, nil, ""}, - {dirProvisioner, nil, ""}, - {shellProvisioner, nil, ""}, - {verifyProvisioner, nil, ""}, + {Provisioner: fileProvisioner, Config: nil, TypeName: ""}, + {Provisioner: dirProvisioner, Config: nil, TypeName: ""}, + {Provisioner: shellProvisioner, Config: nil, TypeName: ""}, + {Provisioner: verifyProvisioner, Config: nil, TypeName: ""}, }, }, } diff --git a/provisioner/ansible-local/provisioner_test.go b/provisioner/ansible-local/provisioner_test.go index f3dec49cb..e72c6c01a 100644 --- a/provisioner/ansible-local/provisioner_test.go +++ b/provisioner/ansible-local/provisioner_test.go @@ -367,8 +367,8 @@ func testProvisionerProvisionDockerWithPlaybookFiles(t *testing.T, templateStrin hooks[packer.HookProvision] = []packer.Hook{ &packer.ProvisionHook{ Provisioners: []*packer.HookedProvisioner{ - {ansible, nil, ""}, - {download, nil, ""}, + {Provisioner: ansible, Config: nil, TypeName: ""}, + {Provisioner: download, Config: nil, TypeName: ""}, }, }, }