summaryrefslogtreecommitdiff
path: root/novaclient/tests/unit/v2/test_shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/tests/unit/v2/test_shell.py')
-rw-r--r--novaclient/tests/unit/v2/test_shell.py12
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')