Skip to content

Commit

Permalink
try workaround for bug #7117 but it still doesn't work...
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Dec 14, 2023
1 parent 166e4d3 commit 54876c6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/AWS_Tests/src/Enso_Cloud_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 54876c6

Please sign in to comment.