github.com/sneal/packer@v0.5.2/builder/vmware/iso/remote_driver_mock.go (about) 1 package iso 2 3 import ( 4 vmwcommon "github.com/mitchellh/packer/builder/vmware/common" 5 ) 6 7 type RemoteDriverMock struct { 8 vmwcommon.DriverMock 9 10 UploadISOCalled bool 11 UploadISOPath string 12 UploadISOResult string 13 UploadISOErr error 14 15 RegisterCalled bool 16 RegisterPath string 17 RegisterErr error 18 19 UnregisterCalled bool 20 UnregisterPath string 21 UnregisterErr error 22 } 23 24 func (d *RemoteDriverMock) UploadISO(path string) (string, error) { 25 d.UploadISOCalled = true 26 d.UploadISOPath = path 27 return d.UploadISOResult, d.UploadISOErr 28 } 29 30 func (d *RemoteDriverMock) Register(path string) error { 31 d.RegisterCalled = true 32 d.RegisterPath = path 33 return d.RegisterErr 34 } 35 36 func (d *RemoteDriverMock) Unregister(path string) error { 37 d.UnregisterCalled = true 38 d.UnregisterPath = path 39 return d.UnregisterErr 40 }