-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ResourceContains has to iterate over all elements
The ResourceContains method was checking only if first resource were containing the requested value. For example, if first element did not have the value but the second did, ResourceContains returned false, because it did not check the second element. The loop is moved outside to easily unit test ResourceContains: otherwise it would require to mock kubernetes client and its methods. As the new unit test is very similar to the one for ObjectContains, we removed the later and extended metadata field in mock object values to cover all ObjectContains case too.
- Loading branch information
Showing
2 changed files
with
110 additions
and
22 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