stub out test
This commit is contained in:
parent
9737b85bbc
commit
6c0c603fbf
|
@ -0,0 +1,27 @@
|
|||
package qemu
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func getTestConfig() *Config {
|
||||
return &Config{}
|
||||
}
|
||||
|
||||
func Test_getCommandArgs(t *testing.T) {
|
||||
state := new(multistep.BasicStateBag)
|
||||
state.Put("vnc_port", 5905)
|
||||
state.Put("iso_path", "/path/to/test.iso")
|
||||
state.Put("ui", packer.TestUi(t))
|
||||
state.Put("config", &Config{})
|
||||
|
||||
args, err := getCommandArgs("", state)
|
||||
if err != nil {
|
||||
t.Fatalf("should not have an error getting args")
|
||||
}
|
||||
assert.Equal(t, args, []string{"partyargs"}, "should party 100 percent of the time")
|
||||
}
|
Loading…
Reference in New Issue