-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51543 from mateiw/develop-dpkg-info-status
Let dpkg.info expose package status
- Loading branch information
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,8 @@ class DpkgTestCase(TestCase, LoaderModuleMockMixin): | |
'depend on the latest\n recommended Emacs release.\n', | ||
'package': 'emacs', 'source': 'emacs-defaults', | ||
'maintainer': 'Simpsons Developers <[email protected]>', | ||
'build_date_time_t': 1407430308, 'installed_size': '25', 'install_date': '2016-12-14T20:02:58Z'} | ||
'build_date_time_t': 1407430308, 'installed_size': '25', 'install_date': '2016-12-14T20:02:58Z', | ||
'status': 'ii'} | ||
] | ||
|
||
def setup_loader_modules(self): | ||
|
@@ -147,12 +148,13 @@ def test_info(self): | |
for pkg_section in ['section', 'architecture', 'original-maintainer', 'maintainer', 'package', 'installed-size', | ||
'build_date_time_t', 'sha256', 'origin', 'build_date', 'size', 'source', 'version', | ||
'install_date_time_t', 'license', 'priority', 'description', 'md5sum', 'supported', | ||
'filename', 'sha1', 'install_date', 'arch']: | ||
'filename', 'sha1', 'install_date', 'arch', "status"]: | ||
assert pkg_section in pkg_data | ||
|
||
assert pkg_data['section'] == 'editors' | ||
assert pkg_data['maintainer'] == 'Simpsons Developers <[email protected]>' | ||
assert pkg_data['license'] == 'BSD v3' | ||
assert pkg_data['status'] == 'ii' | ||
|
||
@patch('salt.modules.dpkg._get_pkg_ds_avail', MagicMock(return_value=dselect_pkg)) | ||
@patch('salt.modules.dpkg._get_pkg_info', MagicMock(return_value=pkgs_info)) | ||
|