summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-execution.at3
-rw-r--r--tests/ovsdb-server.at2
-rw-r--r--tests/ovsdb-tool.at20
3 files changed, 22 insertions, 3 deletions
diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at
index a457b2a8d..d4f2380f8 100644
--- a/tests/ovsdb-execution.at
+++ b/tests/ovsdb-execution.at
@@ -7,7 +7,8 @@ m4_define([ORDINAL_SCHEMA],
"columns": {
"number": {"type": "integer"},
"name": {"type": "string"}}}},
- "version": "5.1.3"}]])
+ "version": "5.1.3",
+ "cksum": "12345678 9"}]])
m4_define([CONSTRAINT_SCHEMA],
[[{"name": "constraints",
diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at
index c9168f8df..dbaacd587 100644
--- a/tests/ovsdb-server.at
+++ b/tests/ovsdb-server.at
@@ -192,7 +192,7 @@ AT_CHECK(
[0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
dnl Check that all the crap is in fact in the database log.
AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
- [[{"name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}}}},"version":"5.1.3"}
+ [[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}}}},"version":"5.1.3"}
{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
{"_comment":"add back row for zero 0","_date":0,"ordinals":{"<1>":{"name":"zero"}}}
diff --git a/tests/ovsdb-tool.at b/tests/ovsdb-tool.at
index 664e616d7..0f11668e1 100644
--- a/tests/ovsdb-tool.at
+++ b/tests/ovsdb-tool.at
@@ -83,7 +83,7 @@ AT_CHECK(
[0], [stdout], [ignore])
dnl Check that all the crap is in fact in the database log.
AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
- [[{"name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}}}},"version":"5.1.3"}
+ [[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}}}},"version":"5.1.3"}
{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
{"_comment":"add back row for zero 0","_date":0,"ordinals":{"<1>":{"name":"zero"}}}
@@ -288,3 +288,21 @@ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
AT_CHECK([ovsdb-tool db-version db], [0], [5.1.3
])
AT_CLEANUP
+
+AT_SETUP([ovsdb-tool schema-cksum])
+AT_KEYWORDS([ovsdb file positive])
+AT_DATA([schema], [ORDINAL_SCHEMA
+])
+AT_CHECK([ovsdb-tool schema-cksum schema], [0], [12345678 9
+])
+AT_CLEANUP
+
+AT_SETUP([ovsdb-tool db-cksum])
+AT_KEYWORDS([ovsdb file positive])
+AT_DATA([schema], [ORDINAL_SCHEMA
+])
+touch .db.~lock~
+AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
+AT_CHECK([ovsdb-tool db-cksum db], [0], [12345678 9
+])
+AT_CLEANUP