-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
chartjes
commented
Mar 18, 2019
- removed debugging message
- added in a set of tests for the v3 API that check schemas and validates SVG file types
- added Python dependency needed for v3 API tests
…I calls, added in requirement needed for v3 tests
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.
I have a couple issues, but overall this looks good. I didn't comment on every test, but I think the mismatch between detail and listing views applies to most/all of the tests.
contract-tests/test_v3_api.py
Outdated
data = r.json() | ||
|
||
if len(data) == 0: | ||
pytest.skip("Could not find a v3 action with the ID {}".format(action_id)) |
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.
I think it should be an error for an action to be published in the list, but not to have a detail page.
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.
I added those in because tests kept failing on CI when they passed every single time on my own laptop when using https://normandy.cdn.mozilla.net as the server.
I'm open to suggestions on how to solve this chicken-and-egg issue.
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.
The test skip for "there is no data in the listing" seem good. I think we should keep those. The second check of "there was data in the listing, but there is not detail" were the ones I had a problem with. It seems that you've already removed those though. I think we're good here.
contract-tests/test_v3_api.py
Outdated
data = r.json() | ||
|
||
if len(data) == 0: | ||
pytest.skip( |
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.
I think this should also fail for having a missing detail page.
assert r.status_code == 200 | ||
|
||
|
||
def test_v3_approval_request_with_id(conf, requests_session): |
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.
Is there a reason you split this into two tests, but made the action version a single test?
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.
No reason, I can just split them into two different tests
…ainst stage GCP results
bors r+ |
Build succeeded |