Skip to content

Commit

Permalink
Modifying device group creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmerold committed Sep 25, 2023
1 parent 9cc14b3 commit 99f7dda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration/webui_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ 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.webui_ip}:5000/config/v1/device-group/{device_group_name}"
device_groups_api_url = f"http://{self.webui_ip}:5000/config/v1/device-group"
url = f"{device_groups_api_url}/{device_group_name}"
response = requests.post(url, json=DEVICE_GROUP_CONFIG)
response.raise_for_status()
now = time.time()
timeout = 5
while time.time() - now <= timeout:
if requests.get(url).json():
if device_group_name in requests.get(device_groups_api_url).json():
logger.info(f"Created device group {device_group_name}.")
return
else:
Expand Down

0 comments on commit 99f7dda

Please sign in to comment.