[Kimchi-devel] [PATCH] tests/test_mockmodel.py: fixes for Power architecture
Daniel Henrique Barboza
dhbarboza82 at gmail.com
Mon Mar 16 16:51:11 UTC 2015
Please ignore this patch.
See "[PATCH] tests/test_osinfo.py: fixes for Power architecture" for
more info.
Thanks
On 03/16/2015 12:55 PM, Daniel Henrique Barboza wrote:
> Testing for the right amount of default memory when running the
> test in a Power system.
>
> Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
> ---
> tests/test_mockmodel.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/test_mockmodel.py b/tests/test_mockmodel.py
> index 542f845..ed3a0f9 100644
> --- a/tests/test_mockmodel.py
> +++ b/tests/test_mockmodel.py
> @@ -28,6 +28,7 @@ import kimchi.mockmodel
> from utils import get_free_port, patch_auth, request, run_server
> from utils import wait_task
> from kimchi.control.base import Collection, Resource
> +from kimchi.osinfo import _get_arch
>
>
> test_server = None
> @@ -155,10 +156,13 @@ class MockModelTests(unittest.TestCase):
> 'io_throughput', 'io_throughput_peak'))
>
> info = model.vm_lookup(u'test-vm')
> + mem_expected = 1024
> + if _get_arch() in ('power', 'ppc64le'):
> + mem_expected = 1280
> self.assertEquals(keys, set(info.keys()))
> self.assertEquals('shutoff', info['state'])
> self.assertEquals('test-vm', info['name'])
> - self.assertEquals(1024, info['memory'])
> + self.assertEquals(mem_expected, info['memory'])
> self.assertEquals(1, info['cpus'])
> self.assertEquals('images/icon-vm.png', info['icon'])
> self.assertEquals(stats_keys, set(info['stats'].keys()))
More information about the Kimchi-devel
mailing list