Skip to content

Commit

Permalink
tests: ovsdb: Add basic configuration tests with config file.
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Dec 13, 2023
1 parent 885faed commit 52ae4f4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/ovsdb-server.at
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,31 @@ AT_CHECK(
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP

AT_SETUP([database multiplexing implementation with config file])
AT_KEYWORDS([ovsdb server positive config-file])
ordinal_schema > schema1
constraint_schema > schema2
AT_CHECK([ovsdb-tool create db1 schema1], [0], [ignore], [ignore])
AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore])
on_exit 'kill $(cat *.pid)'

AT_DATA([config.json], [
{"remotes" : { "punix:db.sock": {} },
"databases": { "db1": {}, "db2": { "service-model": "standalone" } } }
])

AT_CHECK([ovsdb-server --detach --no-chdir --log-file --pidfile \
--config-file=config.json], [0], [ignore], [ignore])
CHECK_DBS([constraints
ordinals
])
AT_CHECK(
[[ovstest test-jsonrpc request unix:db.sock get_schema [\"nonexistent\"]]], [0],
[[{"error":{"details":"get_schema request specifies unknown database nonexistent","error":"unknown database","syntax":"[\"nonexistent\"]"},"id":0,"result":null}
]])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP

AT_SETUP([ovsdb-server/add-db and remove-db])
AT_KEYWORDS([ovsdb server positive])
on_exit 'kill `cat *.pid`'
Expand Down

0 comments on commit 52ae4f4

Please sign in to comment.