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

test(api): add integration tests for external api urls #2091

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

halfwhole
Copy link
Collaborator

@halfwhole halfwhole commented Nov 22, 2022

Problem

We'd like to add integration tests for our external API URLs

Solution

Add integration tests for our external API to create, get, and update URLs at the /api/v1/urls endpoint.

  • The strange ;( ... ) syntax in e.g. ;({ email, apiKey } = await createIntegrationTestUser()) was enforced by prettier, see this comment in their docs
  • There's some duplication in logic for creating the API key, which seems unavoidable because the test environment is set up differently from the server
  • inb4: I hope GitGuardian doesn't complain loudly about the API_KEY_SALT variable, it's used in local dev only surpisingly it looks like we're in the clear!

@halfwhole halfwhole marked this pull request as ready for review November 22, 2022 09:08
@halfwhole halfwhole requested a review from thanhdatle November 22, 2022 09:09
Copy link
Contributor

@thanhdatle thanhdatle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@halfwhole halfwhole force-pushed the test/integration/urls branch from 4481243 to c820607 Compare March 14, 2023 05:41
Base automatically changed from test/integration/urls to develop March 14, 2023 08:37
@halfwhole halfwhole merged commit 94cad4c into develop Mar 15, 2023
@halfwhole halfwhole deleted the test/api/urls branch March 15, 2023 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants