From 17686c1f24ddf1977bbd930ce94b3e3d76962c5b Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Tue, 1 Jul 2014 17:56:49 -0400 Subject: [PATCH] Ignore variable column widths in ovsdb functional tests The ovsdb tests check the output of "ovsdb-client monitor" before and after some operations. The first line of output is a header row with spaces for column separation. The column widths can vary depending on the data in the columns, so compress multiple spaces to one for testing. Change-Id: I6b4690ea9ef1c1b215411ca2c39b1e65fec2c6c7 Partial-bug: #1336172 --- neutron/tests/functional/agent/linux/test_ovsdb_monitor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neutron/tests/functional/agent/linux/test_ovsdb_monitor.py b/neutron/tests/functional/agent/linux/test_ovsdb_monitor.py index 121f2183ad2..35ad48d1cac 100644 --- a/neutron/tests/functional/agent/linux/test_ovsdb_monitor.py +++ b/neutron/tests/functional/agent/linux/test_ovsdb_monitor.py @@ -66,7 +66,10 @@ class TestOvsdbMonitor(BaseMonitorTest): while True: output = list(self.monitor.iter_stdout()) if output: - return output[0] + # Output[0] is header row with spaces for column separation. + # The column widths can vary depending on the data in the + # columns, so compress multiple spaces to one for testing. + return ' '.join(output[0].split()) eventlet.sleep(0.01) def test_killed_monitor_respawns(self):