Fix port number type

This commit is contained in:
Calle Pettersson 2019-04-21 08:33:34 +02:00
parent a360516a64
commit 65545073f8
2 changed files with 3 additions and 3 deletions

View File

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

View File

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