provisioner/windows-shell: remove unused testObjects() (#9116)

This commit is contained in:
Lars Lehtonen 2020-04-27 01:50:31 -07:00 committed by GitHub
parent b679f61536
commit 7440c2e6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -28,8 +28,6 @@ import (
//FIXME query remote host or use %SYSTEMROOT%, %TEMP% and more creative filename //FIXME query remote host or use %SYSTEMROOT%, %TEMP% and more creative filename
const DefaultRemotePath = "c:/Windows/Temp/script.bat" const DefaultRemotePath = "c:/Windows/Temp/script.bat"
var retryableSleep = 2 * time.Second
type Config struct { type Config struct {
shell.Provisioner `mapstructure:",squash"` 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 { 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)) scripts := make([]string, len(p.config.Scripts))
copy(scripts, p.config.Scripts) copy(scripts, p.config.Scripts)

View File

@ -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) { func TestProvisionerProvision_Inline(t *testing.T) {
config := testConfig() config := testConfig()
delete(config, "inline") delete(config, "inline")