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

Enable race detection in unit tests #264

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Go test
if: ${{ matrix.goarch }} == "amd64"
run: sudo go test ./... # sudo needed for netns change in test
run: sudo go test -race ./... # sudo needed for netns change in test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also saw there is a an option in the Makefile to run the tests with the race flag ( make test-race).
I wasn't sure why the CI doesn't use the Makefile to run the tests - so i decided to do minimal changes. But if there isn't any reason not to use the option in the Makefile i think its better to use it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test rules in Makefile need cleaning, but they can be done in a different PR.


coverage:
runs-on: ubuntu-latest
Expand Down