diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2020-08-06 20:46:00 +1200 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2020-08-06 21:47:40 +1200 |
commit | 09aff4df804addbd592443ba19152130c3459376 (patch) | |
tree | 99c5b211e49a252a92015f7575a3aff80659bb29 /troveclient/tests/osc | |
parent | c23da586e9466cf77a8fca314871b3cba58028f9 (diff) | |
download | python-troveclient-09aff4df804addbd592443ba19152130c3459376.tar.gz |
Support rebuild instance CLI
Change-Id: Ieae9216033d1c9ce0078554c7519bc891f50dc35
Diffstat (limited to 'troveclient/tests/osc')
-rw-r--r-- | troveclient/tests/osc/v1/test_database_instances.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/troveclient/tests/osc/v1/test_database_instances.py b/troveclient/tests/osc/v1/test_database_instances.py index 630ba1d..2801419 100644 --- a/troveclient/tests/osc/v1/test_database_instances.py +++ b/troveclient/tests/osc/v1/test_database_instances.py @@ -446,3 +446,19 @@ class TestDatabaseInstanceReboot(TestInstances): self.cmd.take_action(parsed_args) self.mgmt_client.reboot.assert_called_with('instance1') + + +class TestDatabaseInstanceRebuild(TestInstances): + def setUp(self): + super(TestDatabaseInstanceRebuild, self).setUp() + self.cmd = database_instances.RebuildDatabaseInstance(self.app, None) + + @mock.patch.object(utils, 'find_resource') + def test_instance_rebuild(self, mock_find): + args = ['instance1', 'image_id'] + mock_find.return_value = args[0] + parsed_args = self.check_parser(self.cmd, args, []) + + self.cmd.take_action(parsed_args) + + self.mgmt_client.rebuild.assert_called_with('instance1', 'image_id') |