Skip to content
Snippets Groups Projects
Commit 08c11c40 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add unittest for RAPI client's ModifyInstance


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 83e5e26f
No related branches found
No related tags found
No related merge requests found
...@@ -1057,6 +1057,15 @@ class GanetiRapiClientTests(testutils.GanetiTestCase): ...@@ -1057,6 +1057,15 @@ class GanetiRapiClientTests(testutils.GanetiTestCase):
self.assertDryRun() self.assertDryRun()
self.assertUseForce() self.assertUseForce()
def testModifyInstance(self):
self.rapi.AddResponse("23681")
job_id = self.client.ModifyInstance("inst7210", os_name="linux")
self.assertEqual(job_id, 23681)
self.assertItems(["inst7210"])
self.assertHandler(rlib2.R_2_instances_name_modify)
self.assertEqual(serializer.LoadJson(self.rapi.GetLastRequestData()),
{ "os_name": "linux", })
def testModifyCluster(self): def testModifyCluster(self):
for mnh in [None, False, True]: for mnh in [None, False, True]:
self.rapi.AddResponse("14470") self.rapi.AddResponse("14470")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment