github.com/rothwerx/packer@v0.9.0/builder/vmware/iso/step_export_test.go (about) 1 package iso 2 3 import ( 4 "github.com/mitchellh/multistep" 5 "testing" 6 ) 7 8 func TestStepExport_impl(t *testing.T) { 9 var _ multistep.Step = new(StepExport) 10 } 11 12 func testStepExport_wrongtype_impl(t *testing.T, remoteType string) { 13 state := testState(t) 14 step := new(StepExport) 15 16 var config Config 17 config.RemoteType = "foo" 18 state.Put("config", &config) 19 20 if action := step.Run(state); action != multistep.ActionContinue { 21 t.Fatalf("bad action: %#v", action) 22 } 23 if _, ok := state.GetOk("error"); ok { 24 t.Fatal("should NOT have error") 25 } 26 27 // Cleanup 28 step.Cleanup(state) 29 } 30 31 func TestStepExport_wrongtype_impl(t *testing.T) { 32 testStepExport_wrongtype_impl(t, "foo") 33 testStepExport_wrongtype_impl(t, "") 34 }