Make BaseProxyTestCase.test_proxy deterministic wrt traffic/verbose
Commit f464d9f2e1e31de4e916f1c8089853d93b1bba61 in oslo.logging 1.8.0 makes CONF.verbose default to True which is used in NovaWebSocketProxy.__init__ in nova.cmd.baseproxy, so we need to set CONF.verbose=False in the test to make it deterministic. Closes-Bug: #1481043 Co-Authored-By: Solly Ross <sross@redhat.com> Change-Id: Ic1cfa1369789ce25c0503a2c8149e1d55c722005
This commit is contained in:
@@ -52,6 +52,9 @@ class BaseProxyTestCase(test.NoDBTestCase):
|
||||
@mock.patch('nova.console.websocketproxy.NovaWebSocketProxy.start_server')
|
||||
def test_proxy(self, mock_start, mock_init, mock_gmr, mock_log,
|
||||
mock_exists):
|
||||
# Force verbose=False so something else testing nova.cmd.baseproxy
|
||||
# doesn't impact the call to mocked NovaWebSocketProxy.__init__.
|
||||
self.flags(verbose=False)
|
||||
baseproxy.proxy('0.0.0.0', '6080')
|
||||
mock_log.assert_called_once_with(baseproxy.CONF, 'nova')
|
||||
mock_gmr.mock_assert_called_once_with(version)
|
||||
|
||||
Reference in New Issue
Block a user