[Kimchi-devel] [PATCH 0/6] New MockModel \o/

Aline Manera alinefm at linux.vnet.ibm.com
Fri Nov 14 13:58:08 UTC 2014


I will apply patches 1-5 fixing the typos on commit message and just 
resend the patch 6/6 after fixing the tests.

On 11/11/2014 06:46 PM, Aline Manera wrote:
> Yeap! Finally it is done!
>
> The new MockModel uses Model with the 'test:///default' URI.
> I also needed to update some tests cases and the run_tests.sh.in scripts as
> the new MockModel overrides some Model functions, the test_model.py must be the
> first test to be run.
>
> But there are one test that is still failing:
>
> ======================================================================
> FAIL: test_edit_vm (test_rest.RestTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "test_rest.py", line 248, in test_edit_vm
>      self.assertEquals('123456', info["graphics"]["passwd"])
> AssertionError: '123456' != u'abcdef'
>
> I could not identify the reason yet, as the same test runs fine when I only run
> test_rest.py. I suspect it is a override issue.
> While I am investigating it I decided to send the patches to collect feedbacks
> soon.
>
> Aline Manera (6):
>    Re-raise the original exception when creating a new Template
>    Use objectify to Remove metadata namespace
>    Check currentMemory exists prior to remote its XML node
>    Ensure the guest volume exists to remove it
>    Pass libvirt connection as CapabilitiesModel parameter
>    MockModel refactor: Create MockModel based on Model("test:///default")
>
>   src/kimchi/mockmodel.py            | 1769 +++++++-----------------------------
>   src/kimchi/model/host.py           |    3 +-
>   src/kimchi/model/storagepools.py   |    2 +-
>   src/kimchi/model/storagetargets.py |    2 +-
>   src/kimchi/model/templates.py      |    5 +-
>   src/kimchi/model/utils.py          |   37 +-
>   src/kimchi/model/vmhostdevs.py     |    3 +-
>   src/kimchi/model/vmifaces.py       |    5 +-
>   src/kimchi/model/vms.py            |   44 +-
>   src/kimchi/model/vmstorages.py     |   16 +-
>   src/kimchi/vmtemplate.py           |    9 +-
>   tests/run_tests.sh.in              |   18 +-
>   tests/test_authorization.py        |   25 +-
>   tests/test_mockmodel.py            |   60 +-
>   tests/test_rest.py                 |  254 +++---
>   15 files changed, 565 insertions(+), 1687 deletions(-)
>




More information about the Kimchi-devel mailing list