Added knowledge of the "temporaryDevices" statebag to the StepCleanVMX tests for the VMware builders.
This commit is contained in:
parent
fa4998e1ec
commit
96bdf17d2e
|
@ -40,8 +40,12 @@ func TestStepCleanVMX_floppyPath(t *testing.T) {
|
|||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
// Set the path to the temporary vmx
|
||||
state.Put("vmx_path", vmxPath)
|
||||
|
||||
// Add the floppy device to the list of temporary build devices
|
||||
state.Put("temporaryDevices", []string{"floppy0"})
|
||||
|
||||
// Test the run
|
||||
if action := step.Run(context.Background(), state); action != multistep.ActionContinue {
|
||||
t.Fatalf("bad action: %#v", action)
|
||||
|
@ -89,8 +93,12 @@ func TestStepCleanVMX_isoPath(t *testing.T) {
|
|||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
// Set the path to the temporary vmx
|
||||
state.Put("vmx_path", vmxPath)
|
||||
|
||||
// Add the cdrom device to the list of temporary build devices
|
||||
state.Put("temporaryDevices", []string{"ide0:0"})
|
||||
|
||||
// Test the run
|
||||
if action := step.Run(context.Background(), state); action != multistep.ActionContinue {
|
||||
t.Fatalf("bad action: %#v", action)
|
||||
|
@ -141,8 +149,12 @@ func TestStepCleanVMX_ethernet(t *testing.T) {
|
|||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
// Set the path to the temporary vmx
|
||||
state.Put("vmx_path", vmxPath)
|
||||
|
||||
// TODO: Add the ethernet devices to the list of temporary build devices
|
||||
// state.Put("temporaryDevices", []string{"ethernet0", "ethernet1"})
|
||||
|
||||
// Test the run
|
||||
if action := step.Run(context.Background(), state); action != multistep.ActionContinue {
|
||||
t.Fatalf("bad action: %#v", action)
|
||||
|
|
|
@ -15,5 +15,6 @@ func testState(t *testing.T) multistep.StateBag {
|
|||
Reader: new(bytes.Buffer),
|
||||
Writer: new(bytes.Buffer),
|
||||
})
|
||||
state.Put("temporaryDevices", []string{})
|
||||
return state
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue