Add a test setting scheduler parameters to validate the previous bugfix to strncpy of field names. Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- tests/test_domain.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_domain.py diff --git a/tests/test_domain.py b/tests/test_domain.py new file mode 100644 index 0000000..b3fe255 --- /dev/null +++ b/tests/test_domain.py @@ -0,0 +1,19 @@ + +import unittest +import libvirt + +class TestLibvirtDomain(unittest.TestCase): + def setUp(self): + self.conn = libvirt.open("test:///default") + self.dom = self.conn.lookupByName("test") + + def tearDown(self): + self.dom = None + self.conn = None + + def testDomainSchedParams(self): + params = self.dom.schedulerParameters() + self.assertEquals(len(params), 1) + self.assertTrue("weight" in params) + params["weight"] = 100 + self.dom.setSchedulerParameters(params) -- 1.8.5.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list