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

chore(linters): Fix findings found by testifylint: go-require for plugins/outputs #15985

Merged

Conversation

zak-pawel
Copy link
Collaborator

Summary

This is only the first part of a larger effort to address the findings identified by testifylint: go-require: #15535
Once all the findings have been addressed, testifylint: go-require can be enabled in .golangci.yml.

In this PR, I’m focusing on plugins/outputs.

Here are the findings that this PR addresses:

plugins/outputs/file/file_test.go:269:3                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:83:3              testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:87:3              testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:88:3              testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:89:3              testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:90:3              testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:169:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:173:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:174:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:175:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:176:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:704:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:708:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:709:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:710:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:711:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:721:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:725:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:726:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:728:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:729:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:730:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:731:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:741:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:745:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:746:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:747:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:748:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:758:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:762:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:763:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:765:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:766:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:767:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:768:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:778:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:782:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:783:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:784:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:785:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:795:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:799:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:800:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:802:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:803:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:804:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:805:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:815:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:819:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:820:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:821:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:822:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:832:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:836:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:837:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:839:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:840:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:841:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graphite/graphite_test.go:842:3             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graylog/graylog_test_linux.go:194:3         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graylog/graylog_test_linux.go:195:3         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graylog/graylog_test_linux.go:196:3         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/graylog/graylog_test_linux.go:197:3         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/opentelemetry/opentelemetry_test.go:108:14  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:626:4         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:675:4         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:919:10        testifylint  go-require: newPostgresqlTest contains assertions that must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:923:5         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:928:5         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:929:5         testifylint  go-require: require must only be used in the goroutine running the test function
plugins/outputs/postgresql/postgresql_test.go:930:5         testifylint  go-require: require must only be used in the goroutine running the test function

Checklist

  • No AI generated code was used in this PR

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks a lot @zak-pawel!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 8, 2024
@srebhan srebhan removed their assignment Oct 8, 2024
@DStrand1 DStrand1 merged commit 4386535 into influxdata:master Oct 9, 2024
25 of 26 checks passed
@github-actions github-actions bot added this to the v1.32.2 milestone Oct 9, 2024
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
srebhan pushed a commit that referenced this pull request Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore linter ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants