Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings a handful of improvements to how tests are run in eext.
We require golang 1.18, and the tag that's removed by this patch was needed for golang versions older than 1.17.
cmd/
go test dir -tags=sometag
runs the tests tagged with "sometag", but also runs all the untagged tests, thus, having both:go test code.arista.io/eos/tools/eext/cmd
go test code.arista.io/eos/tools/eext/cmd -tags privileged
doesn't bring any value. The elapsed time spent testing is effectively halved.
This commit brings a distinction between unit/code tests and a production-like tests. The latter do destructive changes to the system they're being run on and they should be run in container, thus the "containerized" tag.
Barney already run all the tests, including the destructive ones, so this patch also makes sure that barney runs the newly marked tests.
Overall this patch enables developers to run the normal unit and integration tests without having to reach to Barney to iterate.
The follow-up patch would be to mock all the system tools called by the tests and mocking them inside the code, creating the non-destructive alternative set that could be run on any machine.
The Barney test run go test output is here.