Wrong unit test for pre_live_migration method in compute manager

Bug #1836692 reported by Takashi Natsume
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Takashi Natsume

Bug Description

In nova/tests/unit/compute/test_compute.py, the following method does not check the right method.

    def test_pre_live_migration_instance_has_no_fixed_ip(self):
        # Confirm that no exception is raised if there is no fixed ip on
        # pre_live_migration
        self.compute.driver.pre_live_migration(
            test.MatchType(nova.context.RequestContext),
            test.MatchType(objects.Instance),
            {'block_device_mapping': []},
            mock.ANY, mock.ANY, mock.ANY)

The test method was mentioned in https://review.opendev.org/#/c/330297/ .
It was necessary to follow it up.
The follow-up patch was https://review.opendev.org/#/c/340713/, but it has not been merged.

Tags: testing
summary: - Useless unit test for pre_live_migration method in compute manager
+ Wrong unit test for pre_live_migration method in compute manager
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/670948

Changed in nova:
status: New → In Progress
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/670948
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cdb752f3d3601cb8cca48f28d6b95d2dbc9e1e20
Submitter: Zuul
Branch: master

commit cdb752f3d3601cb8cca48f28d6b95d2dbc9e1e20
Author: Takashi NATSUME <email address hidden>
Date: Tue Jul 16 13:57:08 2019 +0900

    Remove test_pre_live_migration_instance_has_no_fixed_ip

    Remove the following unit test
    because it is not useful any more.

    * test_pre_live_migration_instance_has_no_fixed_ip
      in nova/tests/unit/compute/test_compute.py

    Change-Id: I9edd70d36e7a8f40501ace574d5ae4b576a3e0ff
    Closes-Bug: #1836692

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

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.