Skip to content

Commit

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

0 comments on commit 91104b8

Please sign in to comment.