If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

make running tests in docker environment useful

RESOLVED FIXED

Status

Socorro
General
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

There is a "make dockertest" rule that builds the docker environment to run the tests in a way that works with Circle CI. This is vaguely but haphazardly documented in docker/README.rst.

There's a bunch of things we want to improve with this to make this more convenient for developers getting their stuff done.

1. document how to run just the webapp tests

   1. how to run specific tests (directory, python module, individual)
   2. how to change up test parameters

2. document how to run just the socorro unittests

   1. how to run specific tests (directory, python module, individual)
   2. how to change up test parameters


We also want to document the ARGS=--shell thing and maybe change it so it's less bizarre. Maybe it's worth making a "make dockertestshell" rule?

The changes I did to make the tests work in CircleCI involved using a data container. I suspect that means if you're in a test shell, then the data in /app is a snapshot of the data when you created the shell and isn't updated as you change files with your editor on the host. We really want it to update as you edit files.

This bug covers fixing all these things and whatever Adrian and Peter add in comments.
Summary: running tests in docker environment → make running tests in docker environment useful
Created attachment 8874177 [details] [review]
pr 3803
Assignee: nobody → willkg
Status: NEW → ASSIGNED

Comment 2

4 months ago
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/e2d0f080281162954c7d40b04d1808f143a0b8e4
Fixes bug 1368698 - Improve tests infrastructure for dev (#3803)

This improves the test infrastructure in docker for development. It adds a
"dockertestshell" make rule which sets up the docker environment with the repo
directory mounted in the container and then starts a shell. With this,
developers can run individual tests and also pass in different arguments to the
test runners.

This also documents all that in the docker README.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.