Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingjian Wu committed Jun 6, 2024
1 parent c929239 commit 5b0f39d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ class MetacatSmokeSpec extends Specification {
// Second parent child connected component
def parent2 = "parent2"
def parent2UUID = "parent2_uuid"
def parent2UUID = "p2_uuid"
def parent2Uri = isLocalEnv ? String.format('file:/tmp/%s/%s', databaseName, parent2) : null
def parent2FullName = catalogName + "." + databaseName + "." + parent2
def child21 = "child21"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class ParentChildRelMetadataServiceSpec extends Specification{
assert service.getParents(child, Optional.of(childUUID)) == child_parent_expected
assert service.getParents(child, Optional.empty()) == child_parent_expected
assert service.getChildren(child, Optional.of(childUUID)).isEmpty()
assert service.getParents(child, Optional.empty()).isEmpty()
assert service.getChildren(child, Optional.empty()).isEmpty()

when:
service.rename(parent, newParent, Optional.of(parentUUID))
Expand All @@ -446,7 +446,7 @@ class ParentChildRelMetadataServiceSpec extends Specification{
assert service.getParents(child, Optional.of(childUUID)) == child_parent_expected
assert service.getParents(child, Optional.empty()) == child_parent_expected
assert service.getChildren(child, Optional.of(childUUID)).isEmpty()
assert service.getParents(child, Optional.empty()).isEmpty()
assert service.getChildren(child, Optional.empty()).isEmpty()

// delete the record with parentUUID2
when:
Expand All @@ -469,7 +469,7 @@ class ParentChildRelMetadataServiceSpec extends Specification{
assert service.getParents(child, Optional.of(childUUID)).isEmpty()
assert service.getParents(child, Optional.empty()).isEmpty()
assert service.getChildren(child, Optional.of(childUUID)).isEmpty()
assert service.getParents(child, Optional.empty()).isEmpty()
assert service.getChildren(child, Optional.empty()).isEmpty()
}

def "Test CreateThenRenameThenDeleteWithNoIDSpecified- two same parent name but different id"() {
Expand Down Expand Up @@ -524,11 +524,11 @@ class ParentChildRelMetadataServiceSpec extends Specification{
assert service.getChildren(newParent, Optional.empty()) == parent_children_expected

// Test Parent with UUID2
assert service.getParents(parent, Optional.of(parentUUID2)).isEmpty()
assert service.getParents(parent, Optional.empty()).isEmpty()
assert service.getParents(newParent, Optional.of(parentUUID2)).isEmpty()
assert service.getParents(newParent, Optional.empty()).isEmpty()

assert service.getChildren(parent, Optional.of(parentUUID2)) == parent_children_expected
assert service.getChildren(parent, Optional.empty()) == parent_children_expected
assert service.getChildren(newParent, Optional.of(parentUUID2)) == parent_children_expected
assert service.getChildren(newParent, Optional.empty()) == parent_children_expected

// Test Child
assert service.getParents(child, Optional.of(childUUID)) == child_parent_expected
Expand Down

0 comments on commit 5b0f39d

Please sign in to comment.