Remove mox from testing infrastructure (partial)

Registered by Sean Dague on 2015-12-17

Mox does not support python 3. We have a shim module 'mox3' that was built a couple of years ago, is unmaintained, and as it gets tested more heavily is showing race conditions under python3.

It's time to get rid of mox completely. This blueprint is for tracking any patches that reduce our reliance on mox.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Low
Drafter:
Sean Dague
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
Accepted for mitaka
Implementation:
Implemented
Milestone target:
milestone icon mitaka-3
Started by
John Garbutt on 2016-01-15
Completed by
John Garbutt on 2016-02-19

Related branches

Sprints

Whiteboard

Approved as a split out from the already approved python3 spec. --johnthetubaguy 17th Dec 2015

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

Addressed by: https://review.openstack.org/259096
    introduce ``patch`` method to base test class

Addressed by: https://review.openstack.org/263362
    Remove mox and Stubs from tests/unit/pci/test_manager.py

Addressed by: https://review.openstack.org/264154
    Remove mox usage of test_quota

Addressed by: https://review.openstack.org/264297
    Replace stubs.Set with stub_out

Addressed by: https://review.openstack.org/264353
    Remove mox usage of versions, utils, wsgi

Addressed by: https://review.openstack.org/264393
    Convert nova.tests.unit.image.fake.stub_out_image_service to use stub_out

Addressed by: https://review.openstack.org/264753
    Use stub_out and mock to remove mox:part 3

Addressed by: https://review.openstack.org/265082
    Replace stubs.Set with stub_out (fakes)

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

Addressed by: https://review.openstack.org/265476
    Stop using mox stubs in nova.tests.unit.virt.vmwareapi.test_configdrive

Addressed by: https://review.openstack.org/266060
    change set_stubs to use stub_out in vmwareapi/stubs.py

Addressed by: https://review.openstack.org/266837
    Stop using mox stubs in nova.tests.unit.console

Addressed by: https://review.openstack.org/266903
    Not using mox stubs in nova.tests.unit.consoleauth

Addressed by: https://review.openstack.org/264292
    Remove almost all mox from tests/unit/objects/test_instance.py

Addressed by: https://review.openstack.org/267897
    Replace stubs.Set with stub_out (db)

Addressed by: https://review.openstack.org/267921
    Replace stubs.Set with stub_out (os)

Addressed by: https://review.openstack.org/267950
    Replace stubs.Set with stub_out (utils)

Addressed by: https://review.openstack.org/268081
    Not using mox stubs in nova.tests.unit.volume

Addressed by: https://review.openstack.org/268300
    Replace stubs.Set with stub_out (api)

Addressed by: https://review.openstack.org/268591
    Replace stubs.Set with stub_out (compute api)

Addressed by: https://review.openstack.org/268873
    Stop using mox (scheduler)

Addressed by: https://review.openstack.org/270303
    remove mox from vmwareapi/test_driver_api.py

Addressed by: https://review.openstack.org/270921
    Remove last instance of mox from unit/objects/test_instance.py

Addressed by: https://review.openstack.org/271069
    WIP - remove mox from vmwareapi/test_vif.py

Addressed by: https://review.openstack.org/271312
    not use mox for conductor/test_conductor.py

Addressed by: https://review.openstack.org/271574
    Stop using stubs.Set in vmwareapi unit tests

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

Addressed by: https://review.openstack.org/271711
    Remove mox from objects/test_instance_info_cache.py

Addressed by: https://review.openstack.org/271712
    Remove mox from tests/unit/objects/test_quotas.py

Addressed by: https://review.openstack.org/271713
    Remove mox from tests/unit/objects/test_keypair.py

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

Addressed by: https://review.openstack.org/272705
    not use mox for conductor.tasks

Addressed by: https://review.openstack.org/272874
    Remove mox used in test_server_start_stop

Now we have hit feature freeze, we should probably stop adding new patches for this BP, marking as NeedsCodeReview. --johnthetubaguy 2016.01.31

Addressed by: https://review.openstack.org/275753
    Simple mox removals from objects/test_instance_info_cache.py

Marked as partially complete, while we finish up for mitaka and hit FF. --johnthetubaguy 2016.02.19

Continue this work for newton in https://blueprints.launchpad.net/nova/+spec/remove-mox-newton -- mriedem 20160322

Addressed by: https://review.openstack.org/326218
    Fix wrong patch of unittest in unit/test_metadata.py

Addressed by: https://review.openstack.org/332653
    Replace mox.ContainsKeyValue with Class ContainsKeyValue

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

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.