ironic-lib is not properly mocked

Bug #1552843 reported by Jim Rollenhagen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Won't Fix
Medium
Mario Villaplana

Bug Description

Some of the tests in ironic check to be sure that methods in ironic-lib were called. However some of these methods are called by ironic-lib, not ironic. Ironic shouldn't be verifying those calls, as the calling code in ironic-lib may change and end up breaking ironic unit tests.

Example of a breakage caused by this: https://bugs.launchpad.net/ironic/+bug/1552839

Changed in ironic:
status: New → Confirmed
importance: Undecided → Medium
tags: added: low-hanging-fruit
Changed in ironic:
assignee: nobody → Zhenguo Niu (niu-zglinux)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: Confirmed → In Progress
Changed in ironic:
assignee: Zhenguo Niu (niu-zglinux) → nobody
Changed in ironic:
assignee: nobody → Mario Villaplana (mario-villaplana-j)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/386255
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=ce46c43246ee05f76805b22f4656080b27c2266b
Submitter: Jenkins
Branch: master

commit ce46c43246ee05f76805b22f4656080b27c2266b
Author: Mario Villaplana <email address hidden>
Date: Thu Oct 13 22:15:59 2016 +0000

    Mock ironic-lib properly in test_deploy_utils

    Many of the tests in this file asserted that methods internal to
    ironic-lib were called. This has caused gate failures in the past when
    ironic-lib changes internal logic.

    This mocks out ironic-lib so we only test that the correct methods are
    called from ironic's perspective as an external consumer of ironic-lib.

    Change-Id: I91d3c7d7b8f4dd6b7652e0cac90ea562ae710636
    Partial-Bug: #1552843
    Co-Authored-By: John L. Villalovos <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Zhenguo Niu (<email address hidden>) on branch: master
Review: https://review.opendev.org/289008

Dmitry Tantsur (divius)
Changed in ironic:
status: In Progress → Won't Fix
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.