TestMakeTask.test_make_provisioning_images_task fails randomly

Bug #1434449 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Nikolay Markov

Bug Description

TestMakeTask.test_make_provisioning_images_task test fails from time to time due to changing order of keys in dict that is used as argument when making task template:

self = <nailgun.test.unit.test_tasks_templates.TestMakeTask testMethod=test_make_provisioning_images_task>

    def test_make_provisioning_images_task(self):
        result = tasks_templates.make_provisioning_images_task(
            [1, 2, 3],
            repos=[
                {'name': 'repo', 'uri': 'http://some'}
            ],
            provision_data={
                'codename': 'trusty',
                'image_data': {
                    '/mount': {
                        'format': 'ext4',
                        'uri': 'http://uri'
                    }
                }})

        self.assertEqual(result, {
            'type': 'shell',
            'uids': [1, 2, 3],
            'parameters': {
                'cmd': ('fuel-image \'{"image_data": {"/mount": {"uri": '
                        '"http://uri", "format": "ext4"}}, "output": '
                        '"/var/www/nailgun/targetimages", "repos": [{"name": '
                        '"repo", "uri": "http://some"}], "codename": '
                        '"trusty"}\''),
                'timeout': settings.PROVISIONING_IMAGES_BUILD_TIMEOUT,
                'retries': 1,
                'interval': 1,
> 'cwd': '/',
            }})
E AssertionError: {'parameters': {'cwd': '/', 'timeout': 1200, 'interval': 1, 'retries': 1, 'cmd': [truncated]... != {'parameters': {'cwd': '/', 'timeout': 1200, 'interval': 1, 'retries': 1, 'cmd': [truncated]...
E - {'parameters': {'cmd': 'fuel-image \'{"codename": "trusty", "image_data": {"/mount": {"uri": "http://uri", "format": "ext4"}}, "repos": [{"uri": "http://some", "name": "repo"}], "output": "/var/www/nailgun/targetimages"}\'',
E + {'parameters': {'cmd': 'fuel-image \'{"image_data": {"/mount": {"uri": "http://uri", "format": "ext4"}}, "output": "/var/www/nailgun/targetimages", "repos": [{"name": "repo", "uri": "http://some"}], "codename": "trusty"}\'',
E 'cwd': '/',
E 'interval': 1,
E 'retries': 1,
E 'timeout': 1200},
E 'type': 'shell',
E 'uids': [1, 2, 3]}

nailgun/test/unit/test_tasks_templates.py:151: AssertionError

Little bit more readable format: http://xsnippet.org/360584/

Tags: tech-debt
Nikolay Markov (nmarkov)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Nikolay Markov (nmarkov)
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/167668

Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/167668
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=376e3e62796b670b9cf5abc61ed836172c5df840
Submitter: Jenkins
Branch: master

commit 376e3e62796b670b9cf5abc61ed836172c5df840
Author: Nikolay Markov <email address hidden>
Date: Wed Mar 25 18:59:58 2015 +0300

    Fixed randomly failed test

    Closes-Bug: #1434449

    Change-Id: I9f8840f73b52df6e6505de8a2b2c6cacbacf6fa9

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.