Skip to content

Commit 3483863

Browse files
Guard against ControllerTest being run in non-interactive mode
1 parent 245e3c6 commit 3483863

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

nmostesting/ControllerTest.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,18 @@ class ControllerTest(GenericTest):
7676
"""
7777
Testing initial set up of new test suite for controller testing
7878
"""
79-
def __init__(self, apis, registries, node, dns_server, disable_auto=True, **kwargs):
79+
def __init__(self, apis, registries, node, dns_server, auths, disable_auto=True, **kwargs):
8080
# Remove the spec_path as there are no corresponding GitHub repos for Controller Tests
8181
apis[CONTROLLER_TEST_API_KEY].pop("spec_path", None)
8282
if CONFIG.ENABLE_HTTPS:
8383
# Comms with Testing Facade are http only
84-
apis[CONTROLLER_TEST_API_KEY]["base_url"] \
85-
= apis[CONTROLLER_TEST_API_KEY]["base_url"].replace("https", "http")
86-
apis[CONTROLLER_TEST_API_KEY]["url"] = apis[CONTROLLER_TEST_API_KEY]["url"].replace("https", "http")
87-
GenericTest.__init__(self, apis, disable_auto=disable_auto)
88-
self.authorization = False
84+
if apis[CONTROLLER_TEST_API_KEY]["base_url"] is not None:
85+
apis[CONTROLLER_TEST_API_KEY]["base_url"] \
86+
= apis[CONTROLLER_TEST_API_KEY]["base_url"].replace("https", "http")
87+
if apis[CONTROLLER_TEST_API_KEY]["url"] is not None:
88+
apis[CONTROLLER_TEST_API_KEY]["url"] \
89+
= apis[CONTROLLER_TEST_API_KEY]["url"].replace("https", "http")
90+
GenericTest.__init__(self, apis, auths=auths, disable_auto=disable_auto)
8991
self.primary_registry = registries[1]
9092
self.node = node
9193
self.dns_server = dns_server

0 commit comments

Comments
 (0)