Skip to content

Commit

Permalink
Added crawler for Azure Service principals - Integration test for clu…
Browse files Browse the repository at this point in the history
…ster and DLT pipeline added.

Fixes #249
  • Loading branch information
dipankarkush-db committed Oct 5, 2023
1 parent 9807dad commit 1e07044
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/integration/assessment/test_assessment.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# def test_table_inventory(ws, make_catalog, make_schema):
# pytest.skip("test is broken")


import pytest
from databricks.labs.ucx.mixins.compute import CommandExecutor


# @pytest.mark.skip(reason="Needs to have DLT Pipelines already created ")
@pytest.mark.skip(reason="Needs to have DLT Pipelines already created ")
def test_pipeline_crawler(ws, wsfs_wheel, make_schema, sql_fetch_all):
_, inventory_database = make_schema(catalog="hive_metastore", schema="ucx_dk").split(".")
commands = CommandExecutor(ws)
Expand Down Expand Up @@ -38,6 +38,13 @@ def test_pipeline_crawler(ws, wsfs_wheel, make_schema, sql_fetch_all):
assert results[0].pipeline_name == "ucx-test-pipeline"
assert results[0].creator_name == "dipankar.kushari@databricks.com"

# Cluster config setup -
# fs.azure.account.auth.type.storage_acct_1.dfs.core.windows.net OAuth
# fs.azure.account.oauth.provider.type.storage_acct_1.dfs.core.windows.net org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider
# fs.azure.account.oauth2.client.id.storage_acct_1.dfs.core.windows.net dummy_application_id
# fs.azure.account.oauth2.client.secret.storage_acct_1.dfs.core.windows.net ddddddddddddddddddd
# fs.azure.account.oauth2.client.endpoint.storage_acct_1.dfs.core.windows.net https://login.microsoftonline.com/dummy_tenant_id/oauth2/token


def test_cluster_crawler(ws, wsfs_wheel, make_schema, sql_fetch_all):
_, inventory_database = make_schema(catalog="hive_metastore", schema="ucx_dk").split(".")
Expand Down Expand Up @@ -67,7 +74,7 @@ def test_cluster_crawler(ws, wsfs_wheel, make_schema, sql_fetch_all):
results.append(cluster)

assert len(results) > 0
assert results[0].cluster_id == "1005-055227-lnfw00g5"
assert results[0].cluster_id == "1005-133624-c9lbpv58"
assert results[0].cluster_name == "Dipankar Kushari's Cluster"
assert results[0].creator == "dipankar.kushari@databricks.com"

Expand Down Expand Up @@ -100,6 +107,6 @@ def test_cluster_crawler(ws, wsfs_wheel, make_schema, sql_fetch_all):
# results.append(spn)
#
# assert len(results) > 0
# # assert results[0].cluster_id == "1005-055227-lnfw00g5"
# # assert results[0].cluster_name == "Dipankar Kushari's Cluster"
# # assert results[0].creator == "dipankar.kushari@databricks.com"
# assert results[0].cluster_id == "1005-055227-lnfw00g5"
# assert results[0].cluster_name == "Dipankar Kushari's Cluster"
# assert results[0].creator == "dipankar.kushari@databricks.com"

0 comments on commit 1e07044

Please sign in to comment.