Skip to content

Commit

Permalink
Merge branch 'main' into update-microk8s-version
Browse files Browse the repository at this point in the history
  • Loading branch information
gatici authored Nov 19, 2024
2 parents dd97cd7 + 5aae648 commit 8ab6d42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions tests/integration/nms_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}.")

Expand All @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ab6d42

Please sign in to comment.