Fix port number type

pull/7543/head
Calle Pettersson 7 years ago
parent a360516a64
commit 65545073f8

@ -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")

@ -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)

Loading…
Cancel
Save