Closed Bug 1010006 Opened 12 years ago Closed 9 years ago

fix test infrastructure regarding base data

Categories

(Input Graveyard :: Code Quality, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: willkg, Unassigned)

Details

(Whiteboard: u=dev c=codequality p=3 s=)

OMG. So painful. Right now we depend upon South schema and data migrations to run so that we have all the things in our database that our tests depend on. This sucks, but it's better than the alternatives of maintaining fixtures or setting up all the data including special groups, permissions, etc with model makers in setUp methods. However, this doesn't work with LiveServerTestCase: https://groups.google.com/forum/#!msg/south-users/U7tz5RmhJaU/8Ec-3N77O7QJ We should fix the test infrastructure so it doesn't require data migrations to run to pick up the required stuff in the db.
Couple of options: 1. Write a script that generates a fresh database and then dumps the important data in it to a fixture that is committed and used for the tests--seems easy to do. 2. Write model maker code to set up all the db data--not wildly excited about this, but maybe. Seems like a lot of maintenance. This is biting me now and actually has been biting me periodically for a while. I couldn't figure out why the tests failed in certain run-orders until I fiddled with it for a couple of hours today.
I think I'm about half-way through this now. Given that I've banged my head on it for a couple of hours, I might as well take advantage of that freshness and finish it off.
Assignee: nobody → willkg
Priority: -- → P1
Half of this fixed in PR: https://github.com/mozilla/fjord/pull/282 That disables the LiveServerTestCase tests, fixes some goofy things that were test-order dependent and cleans up some minor things. I needed that now because tests were failing. The other half involves removing the need for data migrations to build the test db. That's a bit more involved, so I'm pushing that part off until a rainy day.
Landed that first part in https://github.com/mozilla/fjord/commit/53791e9 Still need to do the other part, so leaving this open, but dropping the priority. Also, I think this is a 3 pointer.
Priority: P1 → P3
Whiteboard: u=dev c=codequality p= s=input.2014q2 → u=dev c=codequality p=3 s=input.2014q2
Pushing this off indefinitely since I created a new smoketests/ directory with selenium tests that don't use LiveServerTestCase. In doing that, I also removed all the LiveServerTestCase code, so this issue isn't problematic anymore. It might be good to fix still, but I'll wait until we have a compelling need.
Whiteboard: u=dev c=codequality p=3 s=input.2014q2 → u=dev c=codequality p=3 s=
Assignee: willkg → nobody
The Input service has been decommissioned (see bug 1315316) and has been replaced by a redirect to an external vendor (SurveyGizmo). I'm bulk WONTFIXing Input bugs that do not appear to be relevant anymore.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.