-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: tests are broken #7
Conversation
@@ -44,7 +44,7 @@ | |||
"size": 0, | |||
"package_type": "Transfer", | |||
"status": "Uploaded", | |||
"misc_attributes": "" | |||
"misc_attributes": "{}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty string is not a valid JSON document, causing the fixture loader to break. This probably started happening when we updated jsonfield
.
To run the docker-compose command you suggest, is it necessary to be testing from the rdss-archivematica repo? I don't see a docker-compose.yml in this PR. |
From compose/, but there is a PR in rdss-archivematica/ with a commit in it
that adds a helpers/test-ss.sh shortcut.
|
Although I agree I should share an example to run directly with docker run
in this repo. I will!
|
This should work:
But I'll make a couple of changes so we don't need root and all the extra environment strings. I shouldn't use |
I've reviewed this with @jhsimpson IRL. The issue discussed above has been captured here: #9. |
I did get the tests to pass. I had to do
before running the docker-compose command @sevein suggested above:
the output was
👍 |
Some fixes to get our tests working again inside Docker:
storage_service.settings.test
: disable whitenoiselocations/fixtures/package.json
: use json empty document defaultDockerfile
: add p7zip missing dependencyDockerfile
: add workdirDockerfile
: add pythonpathThis is how you can run them to verify the fixes:
You can pass arguments to pytest, e.g.:
... meaning that you want to run only the tests under
test_api.py
and stop the process after hitting the first failing test.