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

refactor: organize tests by endpoint and provide endpoint-specific make targets #566

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

malandis
Copy link
Contributor

@malandis malandis commented Aug 14, 2024

This PR introduces to changes:

  1. Groups the tests by integration vs unit tests first, with namespaces; then by service (cache, topics, auth); then by control vs data. This is to ease filtering by the Makefile targets.
  2. Adds Makefile targets for each of the endpoints (cache, control, token, storage). Because we test Windows-only builds as well, we make each of these OS-conditional.

A caller wishing to run all the tests can run make test. On Windows this will run against both .NET Framework 4.62 (which is Windows only) as well as .NET 6.0. On Linux or Mac OS this will only run against .NET 6.0.

Similarly, a caller wishing to run only the control endpoint tests can run make test-control-endpoint (or test-cache-endpoint, test-token-endpoint, test-storage-endpoint for other endpoints).

In preparation for introducing per-endpoint make targets, we organize
the integration tests by service first and then control vs data
after. We add fully qualified namespaces for this organization so we
can filter on the command line.

We also add namespaces for `Integration` vs `Unit`.
Groups the integration test targets by endpoint and provides
endpoint-specific test targets:

- test-cache
- test-control
- test-token
- test-storage (a no-op since the storage client isn't implemented)

Each of these targets is conditional on the OS as in the previous PR.
@malandis malandis requested review from cprice404 and a team August 14, 2024 01:09
We decided to let the `test` target run the `test` command
unconditionally so as to not let any tests slip through the cracks. We
leave the endpoint patterns as before. We also remove the unit test
target as it is not necessary anymore.
For clarity in other SDKs we will use the format
`test-{endpointname}-endpoint`.
@malandis malandis merged commit ff8a58a into main Aug 14, 2024
8 checks passed
@malandis malandis deleted the refactor/organize-tests-by-endpoint branch August 14, 2024 21:04
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