Skip to content
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

Use autoendpoint-rs in integration tests #168

Closed
AzureMarker opened this issue Jun 25, 2020 · 0 comments · Fixed by #205 or #231
Closed

Use autoendpoint-rs in integration tests #168

AzureMarker opened this issue Jun 25, 2020 · 0 comments · Fixed by #205 or #231
Assignees
Labels
5 Estimate - Medium

Comments

@AzureMarker
Copy link
Contributor

We can reuse the tests in test_integration.py to test the Rust autoendpoint server. However, switching them off of Python autoendpoint means that we would no longer be testing autopush-rs against the autoendpoint version we use in production (at least until autoendpoint-rs goes into production). We may want to duplicate/parameterize the tests.

@AzureMarker AzureMarker added this to the Autoendpoint Rust Server milestone Jun 25, 2020
@AzureMarker AzureMarker self-assigned this Jun 25, 2020
@tublitzed tublitzed added 3 Estimate - Small...ish 5 Estimate - Medium and removed 3 Estimate - Small...ish labels Jul 27, 2020
AzureMarker added a commit that referenced this issue Aug 5, 2020
* Fix importing SkipTest from a private module

* Copy the integration tests and remove unneeded tests

These integration tests will be modified to test the Rust autoendpoint
code. Python autopush code will not be tested in this repo anymore.

Unneeded tests include:
- Legacy message ID/sort key tests
- Table rotation
- The "cross" tests which connected to both Rust and Python connection
  servers in the same test.

Some more changes have been made, mostly around removing dependencies on
the Python autopush code and removing table rotation mechanisms. For
example, we only make one message table instead of one for this month
and one for last month.

* Simplify the integration test setup code

* Replace the Python endpoint server with Rust in the new integration test

* Avoid extra newline between log entries

* Respond with 201 on direct deliveries instead of 200

* Remove some unnecessary global variables

* Replace "endpoint_url" setting with "scheme" (generate the URL instead)

Also removed the unused `debug` setting.

* Use a timestamp in milliseconds for the message ID and sort key

* Apply a fix from Python autopush tests after a Stored HTTP code change

* Fix bottle routes getting added to the default bottle instance

This would cause the wrong routes to be used for each test, eventually
causing an assertion error when checking the megaphone token.

* Set cache-control for HTTP 410 errors

This is expected by an integration test

* Show debug logs in integration tests

* Fix repad_base64 function and add tests

Sometimes it would add three padding characters, while base64 has at
most two padding characters.

* Fix JWT validation by decoding the base64 public key before using it

* Don't pass on encryption headers if there is no data

* Don't set notification encryption headers at all if there's no data

* Fix flake8 formatting issues

Closes #168
This was referenced Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment