[ovs-dev,v2,15/15] tests: Add test for oneline-formatted output for ovn-nbctl.

Message ID 20180712134016.14336-16-jkbs@redhat.com
State Superseded
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 89daf631a..60b4d0c9c 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -1403,3 +1403,24 @@  AT_CHECK([ovn-nbctl ls-list | uuidfilt], [0], [dnl
 
 OVN_NBCTL_TEST_STOP
 AT_CLEANUP
+
+dnl ---------------------------------------------------------------------
+
+AT_SETUP([ovn-nbctl - oneline output])
+OVN_NBCTL_TEST_START
+
+AT_CHECK([ovn-nbctl ls-add ls0 -- ls-add ls1])
+
+# Expect one line for one command.
+AT_CHECK([ovn-nbctl --oneline ls-list | uuidfilt], [0], [dnl
+<0> (ls0)\n<1> (ls1)
+])
+
+# Expect lines for two commands.
+AT_CHECK([ovn-nbctl --oneline ls-list -- ls-list | uuidfilt], [0], [dnl
+<0> (ls0)\n<1> (ls1)
+<0> (ls0)\n<1> (ls1)
+])
+
+OVN_NBCTL_TEST_STOP
+AT_CLEANUP