diff options
author | zhangbailin <zhangbailin@inspur.com> | 2020-04-10 08:39:35 +0800 |
---|---|---|
committer | zhangbailin <zhangbailin@inspur.com> | 2020-04-10 08:39:39 +0800 |
commit | c5f29d683315e1afbe944aca8b3ae819de74d286 (patch) | |
tree | 14919a20e9ad88344a12a74dffb23c9d55c81887 /novaclient | |
parent | 4d6c70d25df99a4f28f263cd3160c74ccf1343e3 (diff) | |
download | python-novaclient-c5f29d683315e1afbe944aca8b3ae819de74d286.tar.gz |
FUP: Add volume-update CLI pre V285 tests
This commit mainly to fix some comments from [1].
[1]https://review.opendev.org/#/c/712651/19/novaclient/tests/unit/v2/test_shell.py@4001
Blueprint: destroy-instance-with-datavolume
Change-Id: Id809f22d0da2cdedf33a2c0df202f3953fd01673
Diffstat (limited to 'novaclient')
-rw-r--r-- | novaclient/tests/unit/v2/test_shell.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py index d21252bd..6aa37f7d 100644 --- a/novaclient/tests/unit/v2/test_shell.py +++ b/novaclient/tests/unit/v2/test_shell.py @@ -4006,6 +4006,18 @@ class ShellTest(utils.TestCase): self.assert_called('PUT', '/servers/1234/os-volume_attachments/Work', {'volumeAttachment': {'volumeId': 'Work'}}) + def test_volume_update_delete_on_termination_pre_v285(self): + self.assertRaises( + SystemExit, self.run_command, + 'volume-update sample-server --delete-on-termination Work Work', + api_version='2.84') + + def test_volume_update_no_delete_on_termination_pre_v285(self): + self.assertRaises( + SystemExit, self.run_command, + 'volume-update sample-server --no-delete-on-termination Work Work', + api_version='2.84') + def test_volume_update_v285(self): self.run_command('volume-update sample-server --delete-on-termination ' 'Work Work', api_version='2.85') |