tripleoclient unittests failing if hw_architecture not equal x86_64

Bug #1784662 reported by YaZug
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
YaZug

Bug Description

Found this Unittest Failure in tripleoclient and it would seem that we might be missing a mock for hw_architecture or better detection and usage of current hw_architecture from system.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py", line 521, in test_overcloud_create_images
    mock.call(mock.ANY, hw_architecture='x86_64'),
  File "/usr/lib/python2.7/site-packages/mock/mock.py", line 969, in assert_has_calls
    ), cause)
  File "/usr/lib/python2.7/site-packages/six.py", line 718, in raise_from
    raise value
AssertionError: Calls not found.
Expected: [call(<ANY>, hw_architecture='x86_64'),
 call(<ANY>, hw_architecture='x86_64'),
 call(<ANY>, hw_architecture='x86_64')]
Actual: [call(10, hw_architecture='ppc64le'),
 call(10, hw_architecture='ppc64le'),
 call(10, hw_architecture='ppc64le')]

Expected result
===============
Run unittests on hw_architecture other than x86_64 and have unittests pass

Actual result
=============
Unittests fail due to hard coded assumption about hw_architecture not mocked out.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Changed in tripleo:
assignee: nobody → YaZug (jon-schlueter)
status: New → In Progress
Changed in tripleo:
status: In Progress → Triaged
importance: Undecided → High
milestone: none → stein-1
Changed in tripleo:
milestone: stein-1 → rocky-rc1
status: Triaged → In Progress
Revision history for this message
YaZug (jon-schlueter) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/587509
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=58888f23984c5cc4028b11d2b69284b4a2da5b48
Submitter: Zuul
Branch: master

commit 58888f23984c5cc4028b11d2b69284b4a2da5b48
Author: Jon Schlueter <email address hidden>
Date: Tue Jul 31 11:56:33 2018 -0400

    Fixup hard-coded hw_architecture in unittest

    Closes-Bug: #1784662
    Change-Id: I344a4e660d29d73058623a7856e5835aa2b7c82d

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/588128

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.5.0

This issue was fixed in the openstack/python-tripleoclient 10.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/queens)

Reviewed: https://review.opendev.org/588128
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=1945c289cfbc0bf43c1cb84cd9d77ce18a0e543b
Submitter: Zuul
Branch: stable/queens

commit 1945c289cfbc0bf43c1cb84cd9d77ce18a0e543b
Author: Jon Schlueter <email address hidden>
Date: Tue Jul 31 11:56:33 2018 -0400

    Fixup hard-coded hw_architecture in unittest

    Closes-Bug: #1784662
    Change-Id: I344a4e660d29d73058623a7856e5835aa2b7c82d
    (cherry picked from commit 58888f23984c5cc4028b11d2b69284b4a2da5b48)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient queens-eol

This issue was fixed in the openstack/python-tripleoclient queens-eol release.

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.