[skunkworks] Auditing contract testing
These is the sample "foundations" PR of a new feature. It does NOT add anything that cannot be merged ASAP. Will hold it as it is a PoC.
It includes:
- Auditing translation layer at
internal/translayer/auditing. - Contract tests for the translation layer at
test/contract/auditing.
Infrastructure that had to be added as a one off, if this approach is followed, next PRs like will not need it:
- Contract tests workflow and wiring from cloud tests:
.github/workflows/contract-tests.yml&.github/workflows/cloud-tests.yml
- Added a rule for contract tests to the
Makefile. - Client building function for translation layer services at
internal/translater/client.go. - Launcher infrastructure for contract tests at
test/helper/launcher.- Comes from earlier PoC #1487.
- A minor improvement for skipping tests at
test/helper/control/enable.go.- And its new usages.
Engineering Proposal: Translation Layer
All Submissions:
- [X] Have you signed our CLA?
https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit/d94928b66c9fb41bd2731a99c2768c4bdb0797ec
The setup of the env, using Kind and the operator itself to prepare things for the test doesn't make me happy. Don't you think that using the Atlas client directly is a better idea? Like this, the contract test would have zero dependencies to be run.
This way we are dogfooding, we depend on us.
I did a try without the operator and it got quite complex. Note we need not only provide a project, or a project and a deployment, but arbitrary setups, which the operator can do just by passing it a YAML input file.
I think my old attempt is there closed somewhere.
@helderjs I found my old attempt, see that is ugly as hell: https://github.com/mongodb/mongodb-atlas-kubernetes/pull/1438
Do you have something else in mind?
@s-urbaniak I believe I applied all your feedback.
Related to CLOUDP-242997