Re: [Kimchi-devel] [PATCH V2] [Kimchi 0/2] Fix VM name conflicts with snapshot reverts

Hi Lucio, I was expecting to have all test passing on Fedora 23 with those patches but I got one error while running the tests: make[4]: Entering directory '/home/alinefm/wok/src/wok/plugins/kimchi/tests' /bin/mkdir -p ../data/screenshots ./run_tests.sh ***** Running unit test: test_mock_storagepool... PASSED - Ran 1 test in 9.337s ***** Running unit test: test_authorization... PASSED - Ran 1 test in 10.786s ***** Running unit test: test_networkxml... PASSED - Ran 10 tests in 0.003s ***** Running unit test: test_storagepoolxml... PASSED - Ran 1 test in 0.001s ***** Running unit test: test_livemigration... PASSED - Ran 11 tests in 0.001s ***** Running unit test: test_mock_storagevolume... FAILED ====================================================================== FAIL: test_storagevolume (test_mock_storagevolume.MockStorageVolumeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_mock_storagevolume.py", line 99, in test_storagevolume _do_volume_test(self, model, host, ssl_port, pool_name) File "test_model_storagevolume.py", line 139, in _do_volume_test self.assertEquals(200, resp.status) AssertionError: 200 != 404 ---------------------------------------------------------------------- Ran 1 test in 7.703s FAILED (failures=1) ***** Running unit test: test_config... PASSED - Ran 3 tests in 0.002s ***** Running unit test: test_vmtemplate... PASSED - Ran 7 tests in 0.453s ***** Running unit test: test_mock_network... PASSED - Ran 1 test in 4.409s ***** Running unit test: test_model_storagepool... PASSED - Ran 1 test in 7.068s ***** Running unit test: test_model_network... PASSED - Ran 4 tests in 12.094s ***** Running unit test: test_template... PASSED - Ran 5 tests in 28.958s ***** Running unit test: test_model_libvirtevents... PASSED - Ran 1 test in 40.671s ***** Running unit test: test_rest... PASSED - Ran 42 tests in 155.819s ***** Running unit test: test_osinfo... PASSED - Ran 5 tests in 0.025s ***** Running unit test: test_mockmodel... PASSED - Ran 5 tests in 20.952s ***** Running unit test: test_model... FAILED ====================================================================== ERROR: test_vm_edit (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_model.py", line 1083, in test_vm_edit inst.vm_update('kimchi-vm1', params) File "/home/alinefm/wok/src/wok/plugins/kimchi/model/vms.py", line 290, in update vm_name, dom = self._static_vm_update(name, dom, params) File "/home/alinefm/wok/src/wok/plugins/kimchi/model/vms.py", line 816, in _static_vm_update self._redefine_snapshots(dom, snapshots_info) File "/home/alinefm/wok/src/wok/plugins/kimchi/model/vms.py", line 737, in _redefine_snapshots xml = xml_item_update(xml, XPATH_SNAP_VM_NAME, dom.name(), None) File "/home/alinefm/wok/src/wok/xmlutils/utils.py", line 52, in xml_item_update item.text = value File "lxml.etree.pyx", line 951, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:46377) File "apihelpers.pxi", line 695, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:20989) File "apihelpers.pxi", line 683, in lxml.etree._createTextNode (src/lxml/lxml.etree.c:20865) File "apihelpers.pxi", line 1393, in lxml.etree._utf8 (src/lxml/lxml.etree.c:27155) ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters ====================================================================== ERROR: test_vm_lifecycle (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_model.py", line 223, in test_vm_lifecycle inst.vm_update('kimchi-vm', {'name': u'kimchi-vm-new'}) File "/home/alinefm/wok/src/wok/plugins/kimchi/model/vms.py", line 290, in update vm_name, dom = self._static_vm_update(name, dom, params) File "/home/alinefm/wok/src/wok/plugins/kimchi/model/vms.py", line 823, in _static_vm_update 'err': e.get_error_message()}) OperationFailed: KCHVM0008E: KCHVM0008E ---------------------------------------------------------------------- Ran 25 tests in 94.421s FAILED (errors=2, skipped=1) ***** Running unit test: test_host... PASSED - Ran 3 tests in 4.786s ***** Running unit test: test_model_storagevolume... FAILED ====================================================================== FAIL: test_storagevolume_action (test_model_storagevolume.StorageVolumeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_model_storagevolume.py", line 274, in test_storagevolume_action _do_volume_test(self, model, host, ssl_port, 'default') File "test_model_storagevolume.py", line 139, in _do_volume_test self.assertEquals(200, resp.status) AssertionError: 200 != 404 ---------------------------------------------------------------------- Ran 2 tests in 10.781s FAILED (failures=1) [03/Jun/2016:18:03:32] ENGINE Waiting for child threads to terminate... ====================================================================== ===================== Kimchi Unit Tests Summary ====================== Ran 129 tests in 408.270 seconds. test_mock_storagevolume FAILED: (failures=1) - full log available at /tmp/tmp.Qe5CD4LmgQ test_model FAILED: (errors=2, skipped=1) - full log available at /tmp/tmp.Qe5CD4LmgQ test_model_storagevolume FAILED: (failures=1) - full log available at /tmp/tmp.Qe5CD4LmgQ And one VM named 'пeω-∨м' was left n my system after running the tests. [alinefm@alinefm-TP440 kimchi]$ sudo virsh list --all [sudo] password for alinefm: Id Name State ---------------------------------------------------- - fedora23 shut off - opensuse42.1 shut off - rhel7.2 shut off - ubuntu15.10 shut off - windows7 shut off - пeω-∨м shut off Could you take a look on it? Thanks, Aline Manera On 06/01/2016 03:48 PM, Lucio Correia wrote:
Changes in V2: * Fix tests
Lucio Correia (2): Always update snapshot XML with new name and UUID Update tests to reflect new behavior
model/vms.py | 12 +++++++++++- tests/test_model.py | 9 ++++++--- 2 files changed, 17 insertions(+), 4 deletions(-)
participants (1)
-
Aline Manera