summaryrefslogtreecommitdiff
path: root/tests/ovsdb-execution.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-03-16 17:08:06 -0700
committerBen Pfaff <blp@nicira.com>2010-03-18 11:32:26 -0700
commit87ab878cadeb8cf5f8f89a7d00bfc64ee6b4edbf (patch)
treebc2b286d73121c22013973e69b280816da28011c /tests/ovsdb-execution.at
parent0cd85e1b0b35eaebe458f1d40c0df8c35d9d7e21 (diff)
downloadopenvswitch-87ab878cadeb8cf5f8f89a7d00bfc64ee6b4edbf.tar.gz
ovsdb: Allow constraining the number of rows in a table.
Diffstat (limited to 'tests/ovsdb-execution.at')
-rw-r--r--tests/ovsdb-execution.at15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at
index dc4f3e883..bbdcbb505 100644
--- a/tests/ovsdb-execution.at
+++ b/tests/ovsdb-execution.at
@@ -28,7 +28,8 @@ m4_define([CONSTRAINT_SCHEMA],
"constrained": {
"columns": {
"positive": {"type": {"key": {"type": "integer",
- "minInteger": 1}}}}}}}]])
+ "minInteger": 1}}}},
+ "maxRows": 1}}}]])
m4_define([WEAK_SCHEMA],
[[{"name": "weak",
@@ -462,10 +463,20 @@ OVSDB_CHECK_EXECUTION([insert and update constraints],
{"op": "update",
"table": "constrained",
"where": [],
- "row": {"positive": -2}}]]]],
+ "row": {"positive": -2}}]]],
+ [[["constraints",
+ {"op": "insert",
+ "table": "constrained",
+ "row": {"positive": 1}}]]],
+ [[["constraints",
+ {"op": "insert",
+ "table": "constrained",
+ "row": {"positive": 2}}]]]],
[[[{"details":"0 is less than minimum allowed value 1","error":"constraint violation"}]
[{"details":"-1 is less than minimum allowed value 1","error":"constraint violation"}]
[{"details":"-2 is less than minimum allowed value 1","error":"constraint violation"}]
+[{"uuid":["uuid","<0>"]}]
+[{"uuid":["uuid","<1>"]},{"details":"transaction causes \"constrained\" table to contain 2 rows, greater than the schema-defined limit of 1 row(s)","error":"constraint violation"}]
]])
OVSDB_CHECK_EXECUTION([referential integrity -- simple],