From f404fedcba7b82cabb0a1a923396882aa854ba7b Mon Sep 17 00:00:00 2001 From: TommyLike Date: Thu, 1 Mar 2018 10:31:21 +0000 Subject: [PATCH] Fix the testcase of test_cmd Any configured value of cluster would lead to the failure of test_cmd testcases, fix this by override the option with None value. Change-Id: Ibaedaca5c5ede285cd39b2793e67895d326672fb --- cinder/tests/unit/test_cmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cinder/tests/unit/test_cmd.py b/cinder/tests/unit/test_cmd.py index 38ed8376e4b..20f7d3b7044 100644 --- a/cinder/tests/unit/test_cmd.py +++ b/cinder/tests/unit/test_cmd.py @@ -167,6 +167,7 @@ class TestCinderVolumeCmdPosix(test.TestCase): backends = ['', 'backend1', 'backend2', ''] CONF.set_override('enabled_backends', backends) CONF.set_override('host', 'host') + CONF.set_override('cluster', None) launcher = get_launcher.return_value cinder_volume.main() @@ -270,6 +271,7 @@ class TestCinderVolumeCmdWin32(test.TestCase): backends = ['', 'backend1', 'backend2', ''] CONF.set_override('enabled_backends', backends) CONF.set_override('host', 'host') + CONF.set_override('cluster', None) launcher = get_launcher.return_value sys.argv += ['--backend_name', 'backend2'] @@ -297,6 +299,7 @@ class TestCinderVolumeCmdWin32(test.TestCase): # We're expecting the service to be run within the same process. CONF.set_override('enabled_backends', ['backend2']) CONF.set_override('host', 'host') + CONF.set_override('cluster', None) launcher = get_launcher.return_value cinder_volume.main()