Skip to content

Commit

Permalink
Add test of non-embedded links in asymmetric objects
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Sep 15, 2023
1 parent 04cd65f commit 68f38c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/object-store/schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,14 @@ TEST_CASE("Schema") {
"Property 'object.link' of type 'object' cannot be a link to an asymmetric object."));
}

SECTION("rejects link properties with asymmetric origin object") {
SECTION("allow link properties with asymmetric origin object") {
Schema schema = {
{"object",
ObjectSchema::ObjectType::TopLevelAsymmetric,
{{"link", PropertyType::Object | PropertyType::Nullable, "link target"}}},
{"link target", {{"value", PropertyType::Int}}},
};
REQUIRE_EXCEPTION(schema.validate(SchemaValidationMode::SyncFLX), SchemaValidationFailed,
ContainsSubstring("Asymmetric table with property 'object.link' of type 'object' "
"cannot have a non-embedded object type."));
REQUIRE_NOTHROW(schema.validate(SchemaValidationMode::SyncFLX));
}

SECTION("allow embedded objects with asymmetric sync") {
Expand Down

0 comments on commit 68f38c7

Please sign in to comment.