You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests run locally do not behave the same as the CI build, unless some quite elaborate manual steps are followed to exactly match the scripts defined in the CI workflow yaml.
Adding further test setup requires extra scripts in the CI workflow yaml, which is already quite extensive.
Proposal
We can define the test setup in the Periscope go code itself, using the following steps:
Use the golang docker client to create an aks-periscope-test-tools docker image that contains the setup tools (kubectl, kind, helm, etc.).
Use the docker client to run kind in a container (using the above image) to create the cluster.
Use the same approach to deploy resources (e.g., helm charts) to the cluster.
We could then:
Remove the setup scripts from the CI workflow, leaving the go test ./... command.
Run go test locally and expect the same behaviour.
Add a vscode launch.json config for debugging tests locally (again behaving exactly the same as the CI workflow).
Benefits
This will allow:
Easier addition of further test setup, which can be run locally, allowing for a tighter dev loop.
Easier increasing of test coverage, especially for OSM/SMI collectors. This in turn would allow:
Motivation
Proposal
We can define the test setup in the Periscope go code itself, using the following steps:
aks-periscope-test-tools
docker image that contains the setup tools (kubectl, kind, helm, etc.).We could then:
go test ./...
command.go test
locally and expect the same behaviour.launch.json
config for debugging tests locally (again behaving exactly the same as the CI workflow).Benefits
This will allow:
The text was updated successfully, but these errors were encountered: