From 14b3573ec527253751ee64886c4abe001e513922 Mon Sep 17 00:00:00 2001 From: Charles Moore Date: Thu, 6 Jun 2024 17:40:26 +0000 Subject: [PATCH] test: Set AWS_ENDPOINT_URL_DEADLINE on Worker Signed-off-by: Charles Moore --- src/deadline_test_fixtures/deadline/worker.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/deadline_test_fixtures/deadline/worker.py b/src/deadline_test_fixtures/deadline/worker.py index c518cef..38fe548 100644 --- a/src/deadline_test_fixtures/deadline/worker.py +++ b/src/deadline_test_fixtures/deadline/worker.py @@ -56,6 +56,14 @@ def configure_worker_command(*, config: DeadlineWorkerConfiguration) -> str: # cmds.append( f"runuser -l {config.user} -s /bin/bash -c 'aws configure add-model --service-model file://{config.service_model_path}'" ) + + if os.environ.get('AWS_ENDPOINT_URL_DEADLINE'): + LOG.info(f"Using AWS_ENDPOINT_URL_DEADLINE: {os.environ.get('AWS_ENDPOINT_URL_DEADLINE')}") + env = os.environ.get('AWS_ENDPOINT_URL_DEADLINE') + cmds.insert( + 0, + f"runuser -l {config.user} -s /bin/bash -c 'echo export AWS_ENDPOINT_URL_DEADLINE={env} >> ~/.bashrc'" + ) return " && ".join(cmds)