Remove mox from testing infrastructure - Pike

Registered by Takashi Natsume

Continue the work from Ocata:

https://blueprints.launchpad.net/nova/+spec/remove-mox-ocata

You can see more context here:
https://blueprints.launchpad.net/nova/+spec/remove-mox

Please note: self.stub_out does not make use of mox, it is there to replace to use of "self.stub.Set" in an easy to review way. Moreover, and proposals to remove the use of stub_out should not be part of this spec.

The current target should be to empty the contents of this file:
https://github.com/openstack/nova/blob/master/tests-py3.txt

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Low
Drafter:
None
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
Accepted for pike
Implementation:
Implemented
Milestone target:
milestone icon pike-3
Started by
John Garbutt
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/remove-mox-pike,n,z

Addressed by: https://review.openstack.org/394738
    Refactor a test method including 3 test cases

Addressed by: https://review.openstack.org/433315
    Remove mox from nova/tests/unit/virt/vmwareapi/test_configdrive.py

Addressed by: https://review.openstack.org/320826
    Remove mox stubs in api/openstack/compute/test_server_reset_state.py

Addressed by: https://review.openstack.org/343465
    Completely remove mox from objects/test_instance.py

Gerrit topic: https://review.openstack.org/#q,topic:bp/remove-mox-ocata,n,z

Addressed by: https://review.openstack.org/389750
    Stop using mox in test_compute_cells.py

Addressed by: https://review.openstack.org/327457
    Stop using mox in virt/xenapi/image/test_glance.py

Addressed by: https://review.openstack.org/342061
    Stop using mox in unit/virt/disk/test_api.py

Addressed by: https://review.openstack.org/342648
    Remove mox in nova/tests/unit/compute/test_shelve.py (3)

Addressed by: https://review.openstack.org/321351
    Remove mox from unit/api/openstack/compute/test_aggregates.py

Addressed by: https://review.openstack.org/320346
    Remove mox from api/openstack/compute/test_deferred_delete.py

Addressed by: https://review.openstack.org/399036
    Remove mox in unit/cells/test_cells_manager.py

Addressed by: https://review.openstack.org/312589
    Remove mox from tests/unit/conductor/tasks/test_live_migrate.py(4)

Addressed by: https://review.openstack.org/434437
    [WIP]Remove mox from nova/tests/unit/test_service.py

Addressed by: https://review.openstack.org/434557
    Remove mox from nova/tests/unit/db/test_db_api.py

Gerrit topic: https://review.openstack.org/#q,topic:bp/remove-mox-newton,n,z

Addressed by: https://review.openstack.org/334395
    Stop using mox from tests/unit/test_service.py

Addressed by: https://review.openstack.org/435610
    Remove mox from nova/tests/unit/api/openstack/compute/test_create_backup.py

Addressed by: https://review.openstack.org/435611
    Remove mox from nova/tests/unit/objects/test_service.py

Addressed by: https://review.openstack.org/436596
    Remove mox from nova/tests/unit/virt/vmwareapi/test_vif.py

Addressed by: https://review.openstack.org/322754
    Remove mox from nova/tests/unit/test_configdrive2.py

Addressed by: https://review.openstack.org/437272
    Remove mox from unit/api/openstack/compute/test_migrate_server.py

Addressed by: https://review.openstack.org/438416
    [WIP] Remove mox from unit/api/openstack/compute/admin_only_action_common.py

Addressed by: https://review.openstack.org/438678
    Remove mox from nova.tests.unit.virt.xenapi.test_vmops.GetConsoleOutputTestCase

Addressed by: https://review.openstack.org/438825
    Remove mox from nova.tests.unit.virt.xenapi.test_xenapi[1]

Addressed by: https://review.openstack.org/438873
    Stop using mox stubs in nova.tests.unit.api.openstack.compute.test_serversV21

Addressed by: https://review.openstack.org/326814
    Stop using mox in compute/test_hypervisors.py

Addressed by: https://review.openstack.org/342626
    Stop using mox int unit/virt/xenapi/image/test_utils.py

Addressed by: https://review.openstack.org/439770
    Remove mox from nova.tests.unit.virt.xenapi.test_vmops[2]

Addressed by: https://review.openstack.org/440475
    Remove mox from nova.tests.unit.api.openstack.compute.test_block_device_mapping

Addressed by: https://review.openstack.org/441784
    Remove mox from nova.tests.unit.objects.test_instance.py

Addressed by: https://review.openstack.org/445504
    Completely remove mox from unit/network/test_linux_net.py

Addressed by: https://review.openstack.org/447260
    remove mox from unit/api/openstack/compute/test_flavors.y

Addressed by: https://review.openstack.org/447412
    Remove mox from cells/test_cells_rpc_driver.py

Addressed by: https://review.openstack.org/342043
    Stop using mox stubs in nova/tests/unit/cells/fakes.py

Addressed by: https://review.openstack.org/448021
    Remove mox from unit/cells/test_cells_messaging.py

Addressed by: https://review.openstack.org/448370
    Remove mox from nova/tests/unit/api/openstack/compute/test_migrations.py

Addressed by: https://review.openstack.org/448377
    Remove mox from nova/tests/unit/api/openstack/compute/test_virtual_interfaces.py

Addressed by: https://review.openstack.org/448386
    Remove mox from nova/tests/unit/consoleauth/test_consoleauth.py

Addressed by: https://review.openstack.org/448393
    Remove mox from nova/tests/unit/api/openstack/compute/test_quotas.py

Addressed by: https://review.openstack.org/448457
    Remove mox from nova/tests/unit/cells/test_cells_rpc_driver.py

Addressed by: https://review.openstack.org/448581
    remove mox from unit/api/openstack/compute/test_flavor_manage.py

Addressed by: https://review.openstack.org/448855
    remove mox from unit/virt/xenapi/image/test_bittorrent.py

Addressed by: https://review.openstack.org/448862
    remove mox from tests/unit/compute/test_compute_utils.py

Addressed by: https://review.openstack.org/449054
    remove mox from unit/api/openstack/compute/test_disk_config.py

Addressed by: https://review.openstack.org/452128
    remove mox from unit/virt/vmwareapi/test_driver_api.py

Gerrit topic: https://review.openstack.org/#q,topic:bug/1649852,n,z

Addressed by: https://review.openstack.org/471408
    Convert additional disassociate tests to mock

Addressed by: https://review.openstack.org/477374
    Stop using mox stubs in test_console_auth_tokens.py

Addressed by: https://review.openstack.org/477384
    Stop using mox stubs in test_keypairs.py

Addressed by: https://review.openstack.org/477439
    Remove mox in test_availability_zone.py

Addressed by: https://review.openstack.org/477730
    Stop using mox stubs in cast_as_call.py

Addressed by: https://review.openstack.org/477781
    emove mox from nova.tests.unit.api.openstack.compute.test_limits

Addressed by: https://review.openstack.org/477812
    Remove mox from nova.tests.unit.api.openstack.compute.test_limits

Addressed by: https://review.openstack.org/477904
    Remove mox from nova.tests.unit.virt.test_block_device

Addressed by: https://review.openstack.org/478423
    Stop using mox stubs in test_remote_consoles.py

Addressed by: https://review.openstack.org/478749
    Remove mox from nova.tests.unit.virt.test_block_device

Considering this done for Pike. I'm sure we have more to go and that can be done in Queens. -- mriedem 20170803

Addressed by: https://review.openstack.org/496691
    Remove mox from unit/conductor/test_conductor.py (1)

Gerrit topic: https://review.openstack.org/#q,topic:bug/1537434,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.