nmos-testing icon indicating copy to clipboard operation
nmos-testing copied to clipboard

IS-12 Test Suites

Open jonathan-r-thorpe opened this issue 1 year ago • 5 comments

  • Initial commit
  • Added IS-12 spec to Config
  • Updated specs for IS-12-01 test suite

jonathan-r-thorpe avatar May 09 '23 14:05 jonathan-r-thorpe

Carrying over the unresolved discussion around whether URL path of IS-12 specs should follow what other specs have done https://github.com/AMWA-TV/nmos-testing/pull/800#discussion_r1184686584

and comment about where "selector" and newly introduced "websocket" parameters are best located https://github.com/AMWA-TV/nmos-testing/pull/800#discussion_r1186648564

jonathan-r-thorpe avatar May 09 '23 14:05 jonathan-r-thorpe

Modify the __init__ of the ControllerTest to support HTTPS and AUTH

    """
    Testing initial set up of new test suite for controller testing
    """
    def __init__(self, apis, registries, node, dns_server, auths, disable_auto=True, **kwargs):
        # Remove the spec_path as there are no corresponding GitHub repos for Controller Tests
        apis[CONTROLLER_TEST_API_KEY].pop("spec_path", None)
        if CONFIG.ENABLE_HTTPS:
            # Comms with Testing Facade are http only
            if apis[CONTROLLER_TEST_API_KEY]["base_url"] is not None:
                apis[CONTROLLER_TEST_API_KEY]["base_url"] \
                    = apis[CONTROLLER_TEST_API_KEY]["base_url"].replace("https", "http")
            if apis[CONTROLLER_TEST_API_KEY]["url"] is not None:
                apis[CONTROLLER_TEST_API_KEY]["url"] \
                    = apis[CONTROLLER_TEST_API_KEY]["url"].replace("https", "http")
        GenericTest.__init__(self, apis, auths=auths, disable_auto=disable_auto)
        self.authorization = False
        if CONFIG.ENABLE_AUTH:
            self.authorization = True
        self.primary_registry = registries[1]
        self.node = node
        self.dns_server = dns_server
        self.mock_registry_base_url = ''
        self.mock_node_base_url = ''
        self.test_data = self.load_resource_data()
        self.senders = []
        self.sender_ip_addresses = {}
        self.receivers = []
        # receiver list containing: {'label': '', 'description': '', 'id': '',
        #   'registered': True/False, 'connectable': True/False, 'display_answer': ''}
        self.senders_ip_base = '239.3.14.'  # Random multicast IP to assign to senders
        self.query_api_version = self.apis[QUERY_API_KEY]["version"] \
            if QUERY_API_KEY in apis and "version" in self.apis[QUERY_API_KEY] else "v1.3"
        self.connection_api_version = self.apis[CONN_API_KEY]["version"] \
            if CONN_API_KEY in apis and "version" in self.apis[CONN_API_KEY] else "v1.1"
        self.qa_api_version = self.apis[CONTROLLER_TEST_API_KEY]["version"] \
            if CONTROLLER_TEST_API_KEY in apis and "version" in self.apis[CONTROLLER_TEST_API_KEY] else "v1.0"
        self.answer_uri = "http://" + get_default_ip() + ":" + str(CONFIG.PORT_BASE) + \
            CALLBACK_ENDPOINT.replace('<version>', self.qa_api_version)

lo-simon avatar Feb 28 '24 11:02 lo-simon

Modify the __init__ of the ControllerTest to support HTTPS and AUTH

    """
    Testing initial set up of new test suite for controller testing
    """
    def __init__(self, apis, registries, node, dns_server, auths, disable_auto=True, **kwargs):
        # Remove the spec_path as there are no corresponding GitHub repos for Controller Tests
        apis[CONTROLLER_TEST_API_KEY].pop("spec_path", None)
        if CONFIG.ENABLE_HTTPS:
            # Comms with Testing Facade are http only
            if apis[CONTROLLER_TEST_API_KEY]["base_url"] is not None:
                apis[CONTROLLER_TEST_API_KEY]["base_url"] \
                    = apis[CONTROLLER_TEST_API_KEY]["base_url"].replace("https", "http")
            if apis[CONTROLLER_TEST_API_KEY]["url"] is not None:
                apis[CONTROLLER_TEST_API_KEY]["url"] \
                    = apis[CONTROLLER_TEST_API_KEY]["url"].replace("https", "http")
        GenericTest.__init__(self, apis, auths=auths, disable_auto=disable_auto)
        self.authorization = False
        if CONFIG.ENABLE_AUTH:
            self.authorization = True
        self.primary_registry = registries[1]
        self.node = node
        self.dns_server = dns_server
        self.mock_registry_base_url = ''
        self.mock_node_base_url = ''
        self.test_data = self.load_resource_data()
        self.senders = []
        self.sender_ip_addresses = {}
        self.receivers = []
        # receiver list containing: {'label': '', 'description': '', 'id': '',
        #   'registered': True/False, 'connectable': True/False, 'display_answer': ''}
        self.senders_ip_base = '239.3.14.'  # Random multicast IP to assign to senders
        self.query_api_version = self.apis[QUERY_API_KEY]["version"] \
            if QUERY_API_KEY in apis and "version" in self.apis[QUERY_API_KEY] else "v1.3"
        self.connection_api_version = self.apis[CONN_API_KEY]["version"] \
            if CONN_API_KEY in apis and "version" in self.apis[CONN_API_KEY] else "v1.1"
        self.qa_api_version = self.apis[CONTROLLER_TEST_API_KEY]["version"] \
            if CONTROLLER_TEST_API_KEY in apis and "version" in self.apis[CONTROLLER_TEST_API_KEY] else "v1.0"
        self.answer_uri = "http://" + get_default_ip() + ":" + str(CONFIG.PORT_BASE) + \
            CALLBACK_ENDPOINT.replace('<version>', self.qa_api_version)

Thanks @lo-simon,

I've made the modification in 34838631ea4b4defbbe941974962ad16f51ccc10 but I've removed the setting of self.authorization as this is already done in the GenericTest base class (and so a repetition). Can you verify this works OK for you?

jonathan-r-thorpe avatar Feb 28 '24 12:02 jonathan-r-thorpe

Added IS-14 Test Suite to this PR:

  • There will be common testing between IS-12 and IS-14, as they both use MS-05 device models.
  • Therefore some refactoring of the IS-12 test suites will be needed.

jonathan-r-thorpe avatar Apr 26 '24 15:04 jonathan-r-thorpe