From 0a53fbc29da151bdb09429c32ddf365ad9c7dc04 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Thu, 18 Jun 2015 14:36:32 +0300 Subject: [PATCH] builder/parallels: Add mock for "SetDefaultConfiguration" method Fixes unit test failures --- builder/parallels/common/driver_mock.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builder/parallels/common/driver_mock.go b/builder/parallels/common/driver_mock.go index 25e4ea182..5629a6db9 100644 --- a/builder/parallels/common/driver_mock.go +++ b/builder/parallels/common/driver_mock.go @@ -37,6 +37,9 @@ type DriverMock struct { SendKeyScanCodesCalls [][]string SendKeyScanCodesErrs []error + SetDefaultConfigurationCalled bool + SetDefaultConfigurationError error + ToolsIsoPathCalled bool ToolsIsoPathFlavor string ToolsIsoPathResult string @@ -107,6 +110,11 @@ func (d *DriverMock) SendKeyScanCodes(name string, scancodes ...string) error { return nil } +func (d *DriverMock) SetDefaultConfiguration(name string) error { + d.SetDefaultConfigurationCalled = true + return d.SetDefaultConfigurationError +} + func (d *DriverMock) Mac(name string) (string, error) { d.MacName = name return d.MacReturn, d.MacError