diff options
author | Michael Hwang <mhwang@research.att.com> | 2017-09-14 10:56:07 -0400 |
---|---|---|
committer | Michael Hwang <mhwang@research.att.com> | 2017-09-14 10:57:30 -0400 |
commit | 66613f4112b0e68f30430944b7d94e6ca14b1f62 (patch) | |
tree | 98316d7a0663e3a2e69d7128bbcc8997b60052ad /python-dockering/tests | |
parent | 0c209c0c2b6e4bbadf413c048d9c535d3c2d1a0b (diff) |
Fix issue where container ports is not list
Container ports was being returned as dict keys for python3
Change-Id: I434049c465094265d8e0ec8c8d6310b682866da8
Issue-Id: DCAEGEN2-91
Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'python-dockering/tests')
-rw-r--r-- | python-dockering/tests/test_config_building.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python-dockering/tests/test_config_building.py b/python-dockering/tests/test_config_building.py index c9251e2..ff1b409 100644 --- a/python-dockering/tests/test_config_building.py +++ b/python-dockering/tests/test_config_building.py @@ -148,3 +148,11 @@ def test_parse_volumes_param(): assert actual == expected assert None == doc._parse_volumes_param(None) + + +def test_get_container_ports(): + hcp = {'publish_all_ports': False, 'port_bindings': {'80': {'HostPort': + '80'}, '22': {'HostPort': '22'}}} + assert sorted(['80', '22']) == sorted(doc._get_container_ports(hcp)) + + assert None == doc._get_container_ports({}) |