Skip to content

Commit

Permalink
Use 'cwd' inplace of 'dest' param for archive.tar
Browse files Browse the repository at this point in the history
-Update spec, change files
-Update corrosponding UT
  • Loading branch information
simran committed May 8, 2020
1 parent 8845365 commit c87207a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions salt-shaptools.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri May 8 23:37:02 UTC 2020 - Simranpal Singh <[email protected]>

- Version 0.3.5
* Add support to pass extra tar options

-------------------------------------------------------------------
Fri Mar 27 18:06:32 UTC 2020 - Simranpal Singh <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion salt-shaptools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# See also https://en.opensuse.org/openSUSE:Specfile_guidelines

Name: salt-shaptools
Version: 0.3.4
Version: 0.3.5
Release: 0
Summary: Salt modules and states for SAP Applications and SLE-HA components management

Expand Down
2 changes: 1 addition & 1 deletion salt/modules/hanamod.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,5 +1000,5 @@ def extract_pydbapi(
except SapFolderNotFoundError:
raise exceptions.CommandExecutionError('HANA client not found')
pydbapi_file = '{}/client/{}'.format(hana_client_folder, name)
__salt__['archive.tar'](options=tar_options_str, tarfile=pydbapi_file, dest=output_dir)
__salt__['archive.tar'](options=tar_options_str, tarfile=pydbapi_file, cwd=output_dir)
return pydbapi_file
2 changes: 1 addition & 1 deletion tests/unit/modules/test_hanamod.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def test_extract_pydbapi(self, mock_get_platform, mock_find_sap_folders, mock_co
mock_find_sap_folders.assert_called_once_with(
['1234', '5678'], compile_mocked)
mock_tar.assert_called_once_with(
options='-l -xvf', tarfile='my_folder/client/PYDBAPI.tar.gz', dest='/tmp/output')
options='-l -xvf', tarfile='my_folder/client/PYDBAPI.tar.gz', cwd='/tmp/output')
assert pydbapi_file == 'my_folder/client/PYDBAPI.tar.gz'

@mock.patch('re.compile')
Expand Down

0 comments on commit c87207a

Please sign in to comment.