Comment 0 for bug 1646963

Revision history for this message
clayg (clay-gerrard) wrote : proxy server controller tests should be reoganized

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 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