-
Notifications
You must be signed in to change notification settings - Fork 46
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 #194 from projectatomic/imagestream-naming
Imagestream naming
- Loading branch information
Showing
10 changed files
with
103 additions
and
44 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
from osbs.utils import deep_update | ||
import pytest | ||
|
||
from osbs.utils import deep_update, get_imagestream_name_from_image | ||
|
||
|
||
def test_deep_update(): | ||
x = {'a': 'A', 'b': {'b1': 'B1', 'b2': 'B2'}} | ||
y = {'b': {'b1': 'newB1', 'b3': 'B3'}, 'c': 'C'} | ||
deep_update(x, y) | ||
assert x == {'a': 'A', 'b': {'b1': 'newB1', 'b2': 'B2', 'b3': 'B3'}, 'c': 'C'} | ||
|
||
|
||
@pytest.mark.parametrize(('img', 'expected'), [ | ||
('fedora23', 'fedora23'), | ||
('fedora23:sometag', 'fedora23'), | ||
('fedora23/python', 'fedora23-python'), | ||
('fedora23/python:sometag', 'fedora23-python'), | ||
('docker.io/fedora23', 'fedora23'), | ||
('docker.io/fedora23/python', 'fedora23-python'), | ||
('docker.io/fedora23/python:sometag', 'fedora23-python'), | ||
]) | ||
def test_get_imagestream_name_from_image(img, expected): | ||
assert get_imagestream_name_from_image(img) == expected |
Oops, something went wrong.