Fix shell tests
Personally, I think these tests should be removed, they are testing OCC. An internal OCC change on a private method broke this test. Change-Id: I760bf90ef8bd97e30be7838874337be695d45285
This commit is contained in:
parent
e8655f44f0
commit
211c14c638
@ -559,7 +559,7 @@ class TestShellCli(TestShell):
|
|||||||
|
|
||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_cloud_no_vendor(self, config_mock):
|
def test_shell_args_cloud_no_vendor(self, config_mock):
|
||||||
config_mock.return_value = copy.deepcopy(CLOUD_1)
|
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_1))
|
||||||
_shell = make_shell()
|
_shell = make_shell()
|
||||||
|
|
||||||
fake_execute(
|
fake_execute(
|
||||||
@ -596,8 +596,8 @@ class TestShellCli(TestShell):
|
|||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_cloud_public(self, config_mock, public_mock):
|
def test_shell_args_cloud_public(self, config_mock, public_mock):
|
||||||
config_mock.return_value = copy.deepcopy(CLOUD_2)
|
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
|
||||||
public_mock.return_value = copy.deepcopy(PUBLIC_1)
|
public_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
|
||||||
_shell = make_shell()
|
_shell = make_shell()
|
||||||
|
|
||||||
fake_execute(
|
fake_execute(
|
||||||
@ -636,8 +636,8 @@ class TestShellCli(TestShell):
|
|||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_precedence(self, config_mock, vendor_mock):
|
def test_shell_args_precedence(self, config_mock, vendor_mock):
|
||||||
config_mock.return_value = copy.deepcopy(CLOUD_2)
|
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
|
||||||
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
|
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
|
||||||
_shell = make_shell()
|
_shell = make_shell()
|
||||||
|
|
||||||
# Test command option overriding config file value
|
# Test command option overriding config file value
|
||||||
@ -690,8 +690,8 @@ class TestShellCliEnv(TestShell):
|
|||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_precedence_1(self, config_mock, vendor_mock):
|
def test_shell_args_precedence_1(self, config_mock, vendor_mock):
|
||||||
config_mock.return_value = copy.deepcopy(CLOUD_2)
|
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
|
||||||
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
|
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
|
||||||
_shell = make_shell()
|
_shell = make_shell()
|
||||||
|
|
||||||
# Test env var
|
# Test env var
|
||||||
@ -731,8 +731,8 @@ class TestShellCliEnv(TestShell):
|
|||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
|
||||||
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
|
||||||
def test_shell_args_precedence_2(self, config_mock, vendor_mock):
|
def test_shell_args_precedence_2(self, config_mock, vendor_mock):
|
||||||
config_mock.return_value = copy.deepcopy(CLOUD_2)
|
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
|
||||||
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
|
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
|
||||||
_shell = make_shell()
|
_shell = make_shell()
|
||||||
|
|
||||||
# Test command option overriding config file value
|
# Test command option overriding config file value
|
||||||
|
Loading…
Reference in New Issue
Block a user