From 7440c2e6ba7c4821c88029c249de961f2d7e4a4f Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 27 Apr 2020 01:50:31 -0700 Subject: [PATCH] provisioner/windows-shell: remove unused testObjects() (#9116) --- provisioner/windows-shell/provisioner.go | 4 +--- provisioner/windows-shell/provisioner_test.go | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/provisioner/windows-shell/provisioner.go b/provisioner/windows-shell/provisioner.go index 4a338b234..f0c6341cb 100644 --- a/provisioner/windows-shell/provisioner.go +++ b/provisioner/windows-shell/provisioner.go @@ -28,8 +28,6 @@ import ( //FIXME query remote host or use %SYSTEMROOT%, %TEMP% and more creative filename const DefaultRemotePath = "c:/Windows/Temp/script.bat" -var retryableSleep = 2 * time.Second - type Config struct { shell.Provisioner `mapstructure:",squash"` @@ -160,7 +158,7 @@ func extractScript(p *Provisioner) (string, error) { } func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.Communicator, _ map[string]interface{}) error { - ui.Say(fmt.Sprintf("Provisioning with windows-shell...")) + ui.Say("Provisioning with windows-shell...") scripts := make([]string, len(p.config.Scripts)) copy(scripts, p.config.Scripts) diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go index 4a5663bdb..278835930 100644 --- a/provisioner/windows-shell/provisioner_test.go +++ b/provisioner/windows-shell/provisioner_test.go @@ -272,11 +272,6 @@ func testUi() *packer.BasicUi { } } -func testObjects() (packer.Ui, packer.Communicator) { - ui := testUi() - return ui, new(packer.MockCommunicator) -} - func TestProvisionerProvision_Inline(t *testing.T) { config := testConfig() delete(config, "inline")