From 65545073f8b80136d32cc6fe84fabcb861eb4d27 Mon Sep 17 00:00:00 2001 From: Calle Pettersson Date: Sun, 21 Apr 2019 08:33:34 +0200 Subject: [PATCH] Fix port number type --- builder/proxmox/step_type_boot_command.go | 4 ++-- builder/proxmox/step_type_boot_command_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/proxmox/step_type_boot_command.go b/builder/proxmox/step_type_boot_command.go index 89d50fb0d..04361ee21 100644 --- a/builder/proxmox/step_type_boot_command.go +++ b/builder/proxmox/step_type_boot_command.go @@ -26,7 +26,7 @@ type stepTypeBootCommand struct { type bootCommandTemplateData struct { HTTPIP string - HTTPPort uint + HTTPPort int } type commandTyper interface { @@ -66,7 +66,7 @@ func (s *stepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag) common.SetHTTPIP(httpIP) s.Ctx.Data = &bootCommandTemplateData{ HTTPIP: httpIP, - HTTPPort: state.Get("http_port").(uint), + HTTPPort: state.Get("http_port").(int), } ui.Say("Typing the boot command") diff --git a/builder/proxmox/step_type_boot_command_test.go b/builder/proxmox/step_type_boot_command_test.go index c51b57d73..9514ee0c4 100644 --- a/builder/proxmox/step_type_boot_command_test.go +++ b/builder/proxmox/step_type_boot_command_test.go @@ -106,7 +106,7 @@ func TestTypeBootCommand(t *testing.T) { state := new(multistep.BasicStateBag) state.Put("ui", packer.TestUi(t)) state.Put("config", c.builderConfig) - state.Put("http_port", uint(0)) + state.Put("http_port", int(0)) state.Put("vmRef", proxmox.NewVmRef(1)) state.Put("proxmoxClient", typer)