diff --git a/tests/integration/nms_helper.py b/tests/integration/nms_helper.py index 8c44ed0c..8a533429 100644 --- a/tests/integration/nms_helper.py +++ b/tests/integration/nms_helper.py @@ -62,8 +62,8 @@ def create_subscriber(self, imsi: str) -> None: imsi (str): Subscriber's IMSI """ SUBSCRIBER_CONFIG["UeId"] = imsi - url = f"http://{self.nms_ip}:5000/api/subscriber/imsi-{imsi}" - response = requests.post(url=url, data=json.dumps(SUBSCRIBER_CONFIG)) + url = f"https://{self.nms_ip}:5000/api/subscriber/imsi-{imsi}" + response = requests.post(url=url, data=json.dumps(SUBSCRIBER_CONFIG), verify=False) response.raise_for_status() logger.info(f"Created subscriber with IMSI {imsi}.") @@ -75,13 +75,13 @@ def create_device_group(self, device_group_name: str, imsis: list) -> None: imsis (list): List of IMSIs to be included in the device group """ DEVICE_GROUP_CONFIG["imsis"] = imsis - url = f"http://{self.nms_ip}:5000/config/v1/device-group/{device_group_name}" - response = requests.post(url, json=DEVICE_GROUP_CONFIG) + url = f"https://{self.nms_ip}:5000/config/v1/device-group/{device_group_name}" + response = requests.post(url, json=DEVICE_GROUP_CONFIG, verify=False) response.raise_for_status() now = time.time() timeout = 5 while time.time() - now <= timeout: - if requests.get(url).json(): + if requests.get(url, verify=False).json(): logger.info(f"Created device group {device_group_name}.") return else: @@ -96,13 +96,13 @@ def create_network_slice(self, network_slice_name: str, device_groups: list) -> device_groups (list): List of device groups to be included in the network slice """ NETWORK_SLICE_CONFIG["site-device-group"] = device_groups - url = f"http://{self.nms_ip}:5000/config/v1/network-slice/{network_slice_name}" - response = requests.post(url, json=NETWORK_SLICE_CONFIG) + url = f"https://{self.nms_ip}:5000/config/v1/network-slice/{network_slice_name}" + response = requests.post(url, json=NETWORK_SLICE_CONFIG, verify=False) response.raise_for_status() now = time.time() timeout = 5 while time.time() - now <= timeout: - if requests.get(url).json(): + if requests.get(url, verify=False).json(): logger.info(f"Created network slice {network_slice_name}.") return else: diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 25960d89..d397ea93 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -70,9 +70,9 @@ async def test_given_external_hostname_configured_for_traefik_when_calling_sdcor self, configure_traefik_external_hostname ): nms_url = self._get_nms_url() - network_configuration_resp = requests.get(f"{nms_url}/network-configuration") + network_configuration_resp = requests.get(f"{nms_url}/network-configuration", verify=False) network_configuration_resp.raise_for_status() - subscribers_resp = requests.get(f"{nms_url}/subscribers") + subscribers_resp = requests.get(f"{nms_url}/subscribers", verify=False) subscribers_resp.raise_for_status() @pytest.mark.abort_on_fail