diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-02-08 15:23:33 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-02-15 12:24:29 -0800 |
| commit | 6aa09313722406629133b375871547fb426800ef (patch) | |
| tree | e949d3551517b8248b1783a4f6d87abf278051af /tests | |
| parent | e1ebc8cea2991e19456cb9fce54ac8167f6dbf4c (diff) | |
| download | openvswitch-6aa09313722406629133b375871547fb426800ef.tar.gz | |
ovsdb-tool: Add commands for printing the database checksum.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ovsdb-execution.at | 3 | ||||
| -rw-r--r-- | tests/ovsdb-server.at | 2 | ||||
| -rw-r--r-- | tests/ovsdb-tool.at | 20 |
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 |
