Skip to content

Commit de36020

Browse files
authored
Fix integration tests on AWS (#978)
1 parent 06838c9 commit de36020

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

tests/integration/framework/test_crawlers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ def test_runtime_backend_permission_denied_handled(ws, wsfs_wheel):
142142
assert permission_denied_fetch == "PASSED"
143143

144144

145-
def test_runtime_backend_unknown_error_handled(ws, wsfs_wheel):
146-
commands = CommandExecutor(ws.clusters, ws.command_execution, lambda: ws.config.cluster_id)
145+
def test_runtime_backend_unknown_error_handled(ws, env_or_skip, wsfs_wheel):
146+
"""We test this on the default cluster, i.e. without UC enabled. The command will throw an unknown error"""
147+
commands = CommandExecutor(ws.clusters, ws.command_execution, lambda: env_or_skip("TEST_DEFAULT_CLUSTER_ID"))
147148

148149
commands.install_notebook_library(f"/Workspace{wsfs_wheel}")
149150

tests/integration/test_installation.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,13 @@ def test_job_cluster_policy(ws, new_installation):
124124

125125
assert policy_definition["spark_version"]["value"] == ws.clusters.select_spark_version(latest=True)
126126
assert policy_definition["node_type_id"]["value"] == ws.clusters.select_node_type(local_disk=True)
127-
assert (
128-
policy_definition["azure_attributes.availability"]["value"] == compute.AzureAvailability.ON_DEMAND_AZURE.value
129-
)
127+
if ws.config.is_azure:
128+
assert (
129+
policy_definition["azure_attributes.availability"]["value"]
130+
== compute.AzureAvailability.ON_DEMAND_AZURE.value
131+
)
132+
if ws.config.is_aws:
133+
assert policy_definition["aws_attributes.availability"]["value"] == compute.AwsAvailability.ON_DEMAND.value
130134

131135

132136
@pytest.mark.skip

0 commit comments

Comments
 (0)