|
@@ -231,16 +231,8 @@ class BaseWindowsMorphingToolsTestCase(test_base.CoriolisBaseTestCase):
|
|
|
self.conn.exec_ps_command.assert_has_calls([
|
|
self.conn.exec_ps_command.assert_has_calls([
|
|
|
mock.call("rm -recurse -force %s" % destination),
|
|
mock.call("rm -recurse -force %s" % destination),
|
|
|
mock.call(
|
|
mock.call(
|
|
|
- "if(([System.Management.Automation.PSTypeName]"
|
|
|
|
|
- "'System.IO.Compression.ZipFile').Type -or "
|
|
|
|
|
- "[System.Reflection.Assembly]::LoadWithPartialName("
|
|
|
|
|
- "'System.IO.Compression.FileSystem')) {"
|
|
|
|
|
- "[System.IO.Compression.ZipFile]::ExtractToDirectory("
|
|
|
|
|
- "'%(path)s', '%(destination)s')} else {mkdir -Force "
|
|
|
|
|
- "'%(destination)s'; $shell = New-Object -ComObject "
|
|
|
|
|
- "Shell.Application;$shell.Namespace("
|
|
|
|
|
- "'%(destination)s').copyhere(($shell.NameSpace("
|
|
|
|
|
- "'%(path)s')).items())}" %
|
|
|
|
|
|
|
+ "Expand-Archive -LiteralPath '%(path)s' "
|
|
|
|
|
+ "-DestinationPath '%(destination)s' -Force" %
|
|
|
{"path": mock.sentinel.archive_path,
|
|
{"path": mock.sentinel.archive_path,
|
|
|
"destination": destination},
|
|
"destination": destination},
|
|
|
ignore_stdout=True)
|
|
ignore_stdout=True)
|