Comment 20 for bug 1666009

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

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

commit bfd80a5d39ba4ad153600ea044e09333a335517a
Author: Mark Goddard <email address hidden>
Date: Wed Jul 12 14:57:18 2017 +0100

    Improve port update API unit tests

    Currently, the RPCAPI update_port method is mocked, and its return
    value set in the unit tests to the expected value - the modified port.
    This isn't really exercising all of the port update API handler, which
    should be modifying the port object appropriately and passing it to the
    RPCAPI update_port method.

    This change adds a side effect to the RPCAPI update_port mock which
    saves the Port object that it is passed to the DB. This allows us to
    avoid fudging the answer and test the code more thoroughly.

    The TestPost test case already does this for port creation.

    Change-Id: I77860b2a24da659418f93c380db67ff4726257ff
    Related-Bug: #1666009