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
While modifying the CI to include sudoers execution for integration tests, I noticed that we are using non-exclusive Go build tags to differentiate between unit and integration tests.
The CI runs the following make targets for each commit:
make gotest GROUP=
make gointegration GROUP=...
If we run the equivalent locally and just targeting one component for a reduced output:
The total number of executed tests just differs by one, this is because unit test files are also included in the "integrations" execution. Files without any build tags (default files) will also be included when using the Go's -tags= flag.
Do we want to keep running unit tests among the integration ones? Could we remove the "unit" test execution from the CI if they are already run?
If all the unit test files are modified to include a negative tag (//go:build !integration), only the actual integration tests are run with the corresponding make target:
make --no-print-directory -C receiver/filestatsreceiver mod-integration-test
running go integration test ./... in /home/hello/opentelemetry-collector-contrib/receiver/filestatsreceiver
/home/hello/opentelemetry-collector-contrib/.tools/gotestsum --rerun-fails=1 --format testname --packages="./..." -- -race -timeout 360s -parallel 4 -tags=integration,""
PASS Test_Integration (3.00s)
PASS . (cached)
EMPTY internal/metadata
DONE 1 tests in 0.185s
The text was updated successfully, but these errors were encountered:
Component(s)
No response
Describe the issue you're reporting
While modifying the CI to include
sudoers
execution for integration tests, I noticed that we are using non-exclusive Go build tags to differentiate between unit and integration tests.The CI runs the following make targets for each commit:
make gotest GROUP=
make gointegration GROUP=...
If we run the equivalent locally and just targeting one component for a reduced output:
Unit test
Integration test
The total number of executed tests just differs by one, this is because unit test files are also included in the "integrations" execution. Files without any build tags (default files) will also be included when using the Go's
-tags=
flag.Do we want to keep running unit tests among the integration ones? Could we remove the "unit" test execution from the CI if they are already run?
If all the unit test files are modified to include a negative tag (
//go:build !integration
), only the actual integration tests are run with the corresponding make target:The text was updated successfully, but these errors were encountered: