diff options
author | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:03:21 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:03:21 -0800 |
commit | fbf925e45da7100e5018bd3ad49532e407666f77 (patch) | |
tree | 7968811ea6fee06c9258e98f383346996998d1ac /tests | |
parent | bfe8e67ad595348f228938663956c3b8325997c5 (diff) |
ovsdb: Get rid of "declare" operation.
It's more elegant, and just as easy to implement, if we allow a
"named-uuid" to be a forward reference to a "uuid-name" in a later
"insert" operation.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ovsdb-execution.at | 8 | ||||
-rw-r--r-- | tests/ovsdb-idl.at | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at index 334e2084..06080f71 100644 --- a/tests/ovsdb-execution.at +++ b/tests/ovsdb-execution.at @@ -443,11 +443,7 @@ OVSDB_CHECK_EXECUTION([referential integrity -- simple], OVSDB_CHECK_EXECUTION([referential integrity -- mutual references], [CONSTRAINT_SCHEMA], - [[[[{"op": "declare", - "uuid-name": "row1"}, - {"op": "declare", - "uuid-name": "row2"}, - {"op": "insert", + [[[[{"op": "insert", "table": "a", "row": {"a": 0, "a2b": ["set", [["named-uuid", "row2"]]], @@ -481,7 +477,7 @@ OVSDB_CHECK_EXECUTION([referential integrity -- mutual references], {"op": "delete", "table": "b", "where": [["b", "==", 1]]}]]]], - [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}] + [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}] [{"uuid":["uuid","<2>"]},{"details":"reference to nonexistent row <3>","error":"referential integrity violation"}] [{"count":1},{"details":"cannot delete a row <0> because of 1 remaining reference(s)","error":"referential integrity violation"}] [{"count":1},{"details":"cannot delete b row <1> because of 1 remaining reference(s)","error":"referential integrity violation"}] diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index 552f627f..6fc57f37 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -184,11 +184,7 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops], "table": "link1", "row": {"i": 0, "k": ["named-uuid", "self"]}, "uuid-name": "self"}]' \ - '[{"op": "declare", - "uuid-name": "row1"}, - {"op": "declare", - "uuid-name": "row2"}, - {"op": "insert", + '[{"op": "insert", "table": "link1", "row": {"i": 1, "k": ["named-uuid", "row2"]}, "uuid-name": "row1"}, @@ -207,7 +203,7 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops], [[000: empty 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]} 002: i=0 k=0 ka=[] l2= uuid=<0> -003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]} +003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]} 004: i=0 k=0 ka=[] l2= uuid=<0> 004: i=1 k=2 ka=[] l2= uuid=<1> 004: i=2 k=1 ka=[] l2= uuid=<2> |