summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/test/unit/test_oc_adm_router.py
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2017-05-03 18:14:16 -0600
committerRich Megginson <rmeggins@redhat.com>2017-05-30 10:39:02 -0600
commita1cfec9bbe43dd005ab16792c90cc949555cce12 (patch)
tree8ac6efa0782dd6e6dbd74a6164249c730a607a69 /roles/lib_openshift/src/test/unit/test_oc_adm_router.py
parent46411cfc431f7960df542c5bdcf62c65f612a965 (diff)
downloadopenshift-a1cfec9bbe43dd005ab16792c90cc949555cce12.tar.gz
openshift-a1cfec9bbe43dd005ab16792c90cc949555cce12.tar.bz2
openshift-a1cfec9bbe43dd005ab16792c90cc949555cce12.tar.xz
openshift-a1cfec9bbe43dd005ab16792c90cc949555cce12.zip
add support for oc_service for labels, externalIPs
Add support for `labels` and `externalIPs` in Services This also adds support for the `labels` parameter of `oadm registry` and `oadm router` to be a `dict` of values. This also converts `labels` dict values in the router and registry classes into a comma delimited list of `key=value` pairs. The list of `--labels` is sorted for consistency in key pair positioning in the output (and for consistency in testing) - otherwise, the order of the list is not guarantee and has actually been observed to be different from run to run.
Diffstat (limited to 'roles/lib_openshift/src/test/unit/test_oc_adm_router.py')
-rwxr-xr-xroles/lib_openshift/src/test/unit/test_oc_adm_router.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/lib_openshift/src/test/unit/test_oc_adm_router.py b/roles/lib_openshift/src/test/unit/test_oc_adm_router.py
index 5481ac623..dcf768e08 100755
--- a/roles/lib_openshift/src/test/unit/test_oc_adm_router.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_adm_router.py
@@ -300,7 +300,7 @@ class RouterTest(unittest.TestCase):
'cert_file': None,
'key_file': None,
'cacert_file': None,
- 'labels': None,
+ 'labels': {"router": "router", "another-label": "val"},
'ports': ['80:80', '443:443'],
'images': None,
'latest_images': None,
@@ -363,6 +363,7 @@ class RouterTest(unittest.TestCase):
mock.call(['oc', 'get', 'secret', 'router-certs', '-o', 'json', '-n', 'default'], None),
mock.call(['oc', 'get', 'clusterrolebinding', 'router-router-role', '-o', 'json', '-n', 'default'], None),
mock.call(['oc', 'adm', 'router', 'router', '--expose-metrics=False', '--external-host-insecure=False',
+ "--labels=another-label=val,router=router",
'--ports=80:80,443:443', '--replicas=2', '--selector=type=infra', '--service-account=router',
'--stats-port=1936', '--dry-run=True', '-o', 'json', '-n', 'default'], None),
mock.call(['oc', 'create', '-f', mock.ANY, '-n', 'default'], None),