From 7011211aeb2d324d772a356dc365f5fccd722b3e Mon Sep 17 00:00:00 2001 From: ariWeinberg <66802642+ariWeinberg@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:48:31 +0200 Subject: [PATCH] refactor: update publish_data_user_location command to use server URL and add input prompts for user interaction --- tests/test_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_app.py b/tests/test_app.py index a6db44cd..30bab61a 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -154,7 +154,7 @@ def publish_data_user_location(src, user, opal_server: OpalServerContainer): """Publish user location data to OPAL.""" # Construct the command to publish data update publish_data_user_location_command = ( - f"opal-client publish-data-update --src-url {src} " + f"opal-client publish-data-update --server-url http://localhost:{opal_server.settings.port} --src-url {src} " f"-t policy_data --dst-path /users/{user}/location {opal_server.obtain_OPAL_tokens()['datasource']}" ) logger.info(publish_data_user_location_command) @@ -163,11 +163,14 @@ def publish_data_user_location(src, user, opal_server: OpalServerContainer): # Execute the command result = subprocess.run(publish_data_user_location_command, shell=True) + + input("press enter to continue!") # Check command execution result if result.returncode != 0: logger.error("Error: Failed to update user location!") else: logger.info(f"Successfully updated user location with source: {src}") + input("press enter to continue!") def test_user_location(opal_server: list[OpalServerContainer], opal_client: list[OpalClientContainer]):