[ovs-dev,v2,13/15] tests: Add test for ovn-nbctl dry run mode.

Message ID 20180712134016.14336-14-jkbs@redhat.com
State New
Headers show
Series
  • Daemon mode for ovn-nbctl
Related show

Commit Message

Jakub Sitnicki July 12, 2018, 1:40 p.m.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
---
 tests/ovn-nbctl.at | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Patch

diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index 73a61a4be..89daf631a 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -1382,3 +1382,24 @@  inactivity_probe    : 30000
 
 OVN_NBCTL_TEST_STOP
 AT_CLEANUP
+
+dnl ---------------------------------------------------------------------
+
+AT_SETUP([ovn-nbctl - dry run mode])
+OVN_NBCTL_TEST_START
+
+# Check that dry run has no permanent effect.
+AT_CHECK([ovn-nbctl --dry-run ls-add ls0 -- ls-list | uuidfilt], [0], [dnl
+<0> (ls0)
+])
+AT_CHECK([ovn-nbctl ls-list | uuidfilt], [0], [dnl
+])
+
+# Check that dry-run mode is not sticky.
+AT_CHECK([ovn-nbctl ls-add ls0])
+AT_CHECK([ovn-nbctl ls-list | uuidfilt], [0], [dnl
+<0> (ls0)
+])
+
+OVN_NBCTL_TEST_STOP
+AT_CLEANUP