From 2f3b1374b92758139d1daded82c55c40a40d1479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Sat, 9 Dec 2023 23:49:41 +0100 Subject: [PATCH] try workaround for bug https://github.com/enso-org/enso/issues/7117 but it still doesn't work... --- test/AWS_Tests/src/Enso_Cloud_Spec.enso | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/AWS_Tests/src/Enso_Cloud_Spec.enso b/test/AWS_Tests/src/Enso_Cloud_Spec.enso index b01cca838cc5e..eb58e11757e5b 100644 --- a/test/AWS_Tests/src/Enso_Cloud_Spec.enso +++ b/test/AWS_Tests/src/Enso_Cloud_Spec.enso @@ -18,10 +18,16 @@ spec = enso_cloud_url = base_url.if_not_nothing <| with_slash = if base_url.ends_with "/" then base_url else base_url + "/" with_slash + "enso-cloud-mock/" - Test_Environment.unsafe_with_environment_override "ENSO_CLOUD_API_URI" enso_cloud_url <| - Test.group "Enso Cloud Basic Utils" pending=pending_has_url <| - Test.specify "should be able to get the cloud URL from environment" <| - api_url = Cloud_Utils.cloud_root_uri - api_url.should_be enso_cloud_url + + ## This helper method is needed, because of the bug https://github.com/enso-org/enso/issues/7117 + If the bug is fixed, we could move the overrides to the top-level and not have to re-initialize them. + with_mock_environment ~action = + Test_Environment.unsafe_with_environment_override "ENSO_CLOUD_API_URI" enso_cloud_url <| + action + + Test.group "Enso Cloud Basic Utils" pending=pending_has_url <| + Test.specify "should be able to get the cloud URL from environment" <| with_mock_environment <| + api_url = Cloud_Utils.cloud_root_uri + api_url.should_equal enso_cloud_url main = Test_Suite.run_main spec