proxy server controller tests should be reorganized

Bug #1646963 reported by clayg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Wishlist
Sachin

Bug Description

Mainly I would like to see test.unit.proxy.test_server split up - the file is huge to begin with

Using the example of splitting up TestObjectController [1]

If you just copy the whole class into test.unit.proxy.controller.test_obj - you should remove all the @unpatch_policies tests [2] - then on the original in test.unit.proxy.test_server you should remove everything *except* the @unpatch_policies tests - then fix all the imports until all the tests pass and aren't duplicated anywhere and try to cleanup any cruft along the way.

Do the same thing for the Account & Container test cases (move them into controller.test_account & controller.test_container) until it feels like test_server.py is only running the tests that exercise the in-process server stuff from do_setup (and all the tests that don't require that infrastructure are split into the respective .controller.test_<service> modules.

This is definitely worth a prize - I'd be happy to negotiate terms if you call me on it

1. N.B. this link is slow (maybe because the file is so big?) https://github.com/openstack/swift/blob/f7bf483a498843b9b3e590a1dcae76a491a66015/test/unit/proxy/test_server.py#L1148
2. e.g. https://github.com/openstack/swift/blob/f7bf483a498843b9b3e590a1dcae76a491a66015/test/unit/proxy/test_server.py#L1219

Sachin (sacpatil)
Changed in swift:
assignee: nobody → Sachin (sacpatil)
Revision history for this message
Sachin (sacpatil) wrote :

@clayg

What about the class -- TestAccountControllerFakeGetResponse in test_server.py? Do you want me to move them to file: proxy/controllers/test_account.py

clayg (clay-gerrard)
description: updated
Revision history for this message
clayg (clay-gerrard) wrote :

@sachin

Yeah, those tests seem to be exercising the use of `account.utils.account_listing_response` in `proxy.controllers.account.AccountController.GETorHEAD` so testing it in `proxy.controllers.test_account` seems reasonable.

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

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

Changed in swift:
status: New → In Progress
Sachin (sacpatil)
summary: - proxy server controller tests should be reoganized
+ proxy server controller tests should be reorganized
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.