Merge "Fix the order of arguments to tar"

This commit is contained in:
Zuul 2020-12-21 21:25:33 +00:00 committed by Gerrit Code Review
commit 4ee95b6a3e
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ def deploy_rpm(filename):
def deploy_targz(filename): def deploy_targz(filename):
cmd = "tar xvzf -C / " + filename cmd = "tar xvz -C / -f " + filename
try: try:
_ = subprocess.run(cmd, shell=True, check=True, stderr=subprocess.PIPE, _ = subprocess.run(cmd, shell=True, check=True, stderr=subprocess.PIPE,
universal_newlines=True) universal_newlines=True)

View File

@ -132,7 +132,7 @@ class TestTripleoDeployArtifacts(tests_base.TestCase):
@mock.patch('subprocess.run') @mock.patch('subprocess.run')
def test_deploy_targz(self, mock_run): def test_deploy_targz(self, mock_run):
tripleo_deploy_artifacts.deploy_targz('foo') tripleo_deploy_artifacts.deploy_targz('foo')
mock_run.assert_called_once_with('tar xvzf -C / foo', check=True, mock_run.assert_called_once_with('tar xvz -C / -f foo', check=True,
shell=True, stderr=-1, shell=True, stderr=-1,
universal_newlines=True) universal_newlines=True)