Skip to content

Commit 91f8fcc

Browse files
committed
[test:fix] Fixed cm_sql purge by removing it from assigned term
1 parent f683a0f commit 91f8fcc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/integration/custom_metadata_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ def cm_dq(
441441
@pytest.fixture(scope="module")
442442
def cm_sql(
443443
client: AtlanClient,
444+
term: AtlasGlossaryTerm,
444445
) -> Generator[CustomMetadataDef, None, None]:
445446
attribute_defs = [
446447
AttributeDef.create(
@@ -458,6 +459,10 @@ def cm_sql(
458459
locked=False,
459460
)
460461
yield cm
462+
# Remove CM_SQL data from the term before purging the definition.
463+
# test_save_merging_cm writes CM_SQL onto the term; without this cleanup
464+
# Atlas rejects the typedef purge with ConflictError "has references".
465+
client.asset.remove_custom_metadata(term.guid, cm_name=CM_SQL)
461466
wait_for_successful_custometadatadef_purge(CM_SQL, client=client)
462467

463468

0 commit comments

Comments
 (0)