]> git.proxmox.com Git - ovs.git/commitdiff
tests: Add test for oneline-formatted output for ovn-nbctl.
authorJakub Sitnicki <jkbs@redhat.com>
Thu, 19 Jul 2018 13:51:25 +0000 (15:51 +0200)
committerBen Pfaff <blp@ovn.org>
Mon, 23 Jul 2018 23:14:14 +0000 (16:14 -0700)
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
tests/ovn-nbctl.at

index 0093912beeba77a8020c577ccd645f8650a0a51a..2da3c0802587a3aa441fc6f4dd3f40e551567724 100644 (file)
@@ -1408,3 +1408,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])
+
+dnl Expect one line for one command.
+AT_CHECK([ovn-nbctl --oneline ls-list | uuidfilt], [0], [dnl
+<0> (ls0)\n<1> (ls1)
+])
+
+dnl 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