-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
99% unit test coverage for update.py
Also: - MockImagePolicies: modified to correctly handle ref_count and name when the policy does not exist in all_policies - delete.py: Added Summary to all unit tests - update.py: make self.image_policies private (self._image_policies) - update.py: fix typo in fail_json message - update.py: fix docstring for _build_payloads_to_commit() - update.py: in _build_payloads_to_commit() remove ref_count, imageName, and platformPolicies from the merged payload since these are not valid parameters for the edit-policy endpoint (these ARE returned by the controller, hence we have to remove them). - update.py: _send_payloads(): directly set self.response_current, and self.result_current from the return values of their respective calls. - update.py: _send_payloads(): out of paranoia, deepcopy the response, result, payload when assigning values to diff_*, response_* and result_*. - update.py, ImagePolicyUpdate.payload setter: we needed to set payloads as well here. fixed. - replace.py: move _default_policy() into ImagePolicyCommon()
- Loading branch information
1 parent
5c6d6bc
commit fdfccde
Showing
14 changed files
with
2,018 additions
and
94 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
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
Oops, something went wrong.