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

Fix mock server tests #43

Merged
merged 6 commits into from
Nov 13, 2023
Merged

Fix mock server tests #43

merged 6 commits into from
Nov 13, 2023

Conversation

botimer
Copy link
Member

@botimer botimer commented Nov 10, 2023

No description provided.

- Log all GETs in mock API
- Fix mock-api hostname
- Check environment for LAUTH_TEST_API_URL
- Specify localhost:9000 as default mock API, mock-api:9000 when running
  library tests with Compose
- Add HttpClient::getOptional
The mock server is not intended to serve requests/responses for all
tests. We only intend to use it to ensure that we handle URLs, query
parameters, headers, and general HTTP matters correctly.

Everything "outward" from here should use mocks, generally, out to the
system tests, which will use a real API. The HttpClient response bodies
can be mocked inline in the ApiClient tests for locality and ease. The
mock really server only needs to run for http_client_test.cpp.
This ensures that the mock API is up so the HttpClient tests can run
without setting anything up or setting environment manually.
Run on pushes to main and changes to pull requests, not every commit,
which was triggering two runs.
@gkostin1966 gkostin1966 merged commit e03ce2b into main Nov 13, 2023
3 checks passed
@gkostin1966 gkostin1966 deleted the fix-mock-server-tests branch November 13, 2023 15:09
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