Skip to content

Commit 1f0ce43

Browse files
authored
Merge pull request #436 from atlanhq/fix-integration-tests
Updated integration test to align to new tenant setup
2 parents d3384b0 + 0ae4f96 commit 1f0ce43

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

tests/integration/purpose_test.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828

2929
MODULE_NAME = TestId.make_unique("Purpose")
3030
PERSONA_NAME = "Data Assets"
31-
DB_NAME = "RAW"
32-
TABLE_NAME = "PACKAGETYPES"
33-
COLUMN_NAME = "PACKAGETYPENAME"
34-
SCHEMA_NAME = "WIDEWORLDIMPORTERS_WAREHOUSE"
31+
DB_NAME = "ANALYTICS"
32+
TABLE_NAME = "STG_STATE_PROVINCES"
33+
COLUMN_NAME = "LATEST_RECORDED_POPULATION"
34+
SCHEMA_NAME = "WIDE_WORLD_IMPORTERS"
35+
REDACTED_NUMBER = "0000000"
3536
API_TOKEN_NAME = MODULE_NAME
3637

3738

@@ -178,7 +179,7 @@ def test_find_purpose_by_name(
178179
count = 0
179180
# TODO: replace with exponential back-off and jitter
180181
while not result and count < 10:
181-
time.sleep(2)
182+
time.sleep(5)
182183
result = client.asset.find_purposes_by_name(MODULE_NAME)
183184
count += 1
184185
assert result
@@ -269,11 +270,9 @@ def test_run_query_without_policy(client: AtlanClient, assign_tag_to_asset, quer
269270
assert response.rows
270271
assert len(response.rows) > 1
271272
row = response.rows[0]
272-
assert row
273-
assert len(row) == 7
274-
assert row[2]
273+
assert row and len(row) == 10
275274
# Ensure it is NOT redacted
276-
assert row[2].startswith("Xx") is False
275+
assert row[6] and row[6] != REDACTED_NUMBER
277276

278277

279278
def test_token_permissions(client: AtlanClient, token):
@@ -317,8 +316,6 @@ def test_run_query_with_policy(assign_tag_to_asset, token, query):
317316
assert response.rows
318317
assert len(response.rows) > 1
319318
row = response.rows[0]
320-
assert row
321-
assert len(row) == 7
322-
assert row[2]
319+
assert row and len(row) == 10
323320
# Ensure it IS redacted
324-
assert row[2].startswith("Xx")
321+
assert row[6] and row[6] == REDACTED_NUMBER

tests/integration/test_task_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
MODULE_NAME = TestId.make_unique("TaskClient")
1616
TAG_NAME = MODULE_NAME
1717

18-
DB_NAME = "RAW"
18+
DB_NAME = "WIDE_WORLD_IMPORTERS"
1919
TABLE_NAME = "PACKAGETYPES"
2020
COLUMN_NAME = "PACKAGETYPENAME"
21-
SCHEMA_NAME = "WIDEWORLDIMPORTERS_WAREHOUSE"
21+
SCHEMA_NAME = "BRONZE_WAREHOUSE"
2222

2323

2424
@pytest.fixture(scope="module")
2525
def snowflake_conn(client: AtlanClient):
2626
return client.asset.find_connections_by_name(
27-
"development", AtlanConnectorType.SNOWFLAKE
27+
"production", AtlanConnectorType.SNOWFLAKE
2828
)[0]
2929

3030

tests/integration/test_workflow_client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,16 +280,6 @@ def test_get_all_credentials(client: AtlanClient):
280280
), "Expected at least one record but found none"
281281

282282

283-
def test_get_all_credentials_with_limit_and_offset(client: AtlanClient):
284-
limit = 5
285-
offset = 2
286-
credentials = client.credentials.get_all(limit=limit, offset=offset)
287-
assert credentials.records is not None, "Expected records but found None"
288-
assert (
289-
len(credentials.records or []) <= limit
290-
), f"Expected at most {limit} records, got {len(credentials.records or [])}"
291-
292-
293283
def test_get_all_credentials_with_filter_limit_offset(client: AtlanClient):
294284
filter_criteria = {"connectorType": "jdbc"}
295285
limit = 1

0 commit comments

Comments
 (0)