summaryrefslogtreecommitdiff
path: root/tests/ovsdb-types.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-02-08 14:09:41 -0800
committerBen Pfaff <blp@nicira.com>2010-02-08 14:16:19 -0800
commit0d0f05b909b6428d44eb147bd4edd73782d2a137 (patch)
treec64d595c7df2281b6a69d00dc2a4f73d37986a40 /tests/ovsdb-types.at
parentbd76d25d8b3b7d11c5a326e91d784ad2cdeecd45 (diff)
downloadopenvswitch-0d0f05b909b6428d44eb147bd4edd73782d2a137.tar.gz
ovsdb: Add support for referential integrity in the database itself.
Diffstat (limited to 'tests/ovsdb-types.at')
-rw-r--r--tests/ovsdb-types.at7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ovsdb-types.at b/tests/ovsdb-types.at
index b7fddc7e2..4647e69de 100644
--- a/tests/ovsdb-types.at
+++ b/tests/ovsdb-types.at
@@ -70,6 +70,13 @@ OVSDB_CHECK_NEGATIVE([maxLength must not be negative],
[[parse-base-type '{"type": "string", "maxLength": -1}']],
[maxLength out of valid range 0 to 4294967295])
+OVSDB_CHECK_POSITIVE([uuid refTable],
+ [[parse-base-type '{"type": "uuid", "refTable": "myTable"}' ]],
+ [{"refTable":"myTable","type":"uuid"}])
+OVSDB_CHECK_NEGATIVE([uuid refTable must be valid id],
+ [[parse-base-type '{"type": "uuid", "refTable": "a-b-c"}' ]],
+ [Type mismatch for member 'refTable'])
+
OVSDB_CHECK_NEGATIVE([void is not a valid base-type],
[[parse-base-type '["void"]' ]], ["void" is not an atomic-type])
OVSDB_CHECK_NEGATIVE(["type" member must be present],