Skip to content

Commit

Permalink
address test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingjian Wu committed Mar 6, 2024
1 parent 9296322 commit beef522
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1669,15 +1669,17 @@ class MetacatSmokeSpec extends Specification {
createTable(catalogName, databaseName, "table1")
tagApi.setTableTags(catalogName, databaseName, "table1", ['table1', 'test'] as Set)
then:
tagApi.getTags().size() == 2
// Bt default, the setup already contains the following tags
// [data-category:non-customer, test, test_tag, unused, do_not_drop, iceberg_migration_do_not_modify, do_not_rename]
tagApi.getTags().size() == 8
tagApi.list(['table1', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.search('test', null, null, null).size() == 3
tagApi.search('table1', null, null, null).size() == 3
when:
createTable(catalogName, databaseName, "table2")
tagApi.setTableTags(catalogName, databaseName, "table2", ['table2', 'test'] as Set)
then:
tagApi.getTags().size() == 3
tagApi.getTags().size() == 9
tagApi.list(['table1', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.list(['table2', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.list(['test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 2
Expand All @@ -1688,7 +1690,7 @@ class MetacatSmokeSpec extends Specification {
createTable(catalogName, databaseName, "table3")
tagApi.setTableTags(catalogName, databaseName, "table3", ['table3', 'unused'] as Set)
then:
tagApi.getTags().size() == 5
tagApi.getTags().size() == 11
tagApi.list(['table1', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.list(['table2', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.list(['test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 2
Expand All @@ -1702,7 +1704,7 @@ class MetacatSmokeSpec extends Specification {
when:
api.deleteTable(catalogName, databaseName, "table1")
then:
tagApi.getTags().size() == 5
tagApi.getTags().size() == 11
tagApi.list(['table1', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 0
tagApi.list(['table2', 'test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
tagApi.list(['test'] as Set<String>, null, null, null, null, QualifiedName.Type.TABLE).size() == 1
Expand Down

0 comments on commit beef522

Please sign in to comment.