Browse Source

Merge "Fix the order of arguments to tar"

changes/21/704421/3
Zuul 10 months ago
committed by Gerrit Code Review
parent
commit
4ee95b6a3e
  1. 2
      tripleo_ansible/ansible_plugins/modules/tripleo_deploy_artifacts.py
  2. 2
      tripleo_ansible/tests/modules/test_tripleo_deploy_artifacts.py

2
tripleo_ansible/ansible_plugins/modules/tripleo_deploy_artifacts.py

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

2
tripleo_ansible/tests/modules/test_tripleo_deploy_artifacts.py

@ -132,7 +132,7 @@ class TestTripleoDeployArtifacts(tests_base.TestCase):
@mock.patch('subprocess.run')
def test_deploy_targz(self, mock_run):
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,
universal_newlines=True)

Loading…
Cancel
Save