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/common and plugins/inputs #15991

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/common and plugins/inputs.

Here are the findings that this PR addresses:

plugins/common/proxy/socks5_test.go:35:14                   testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/goshim_test.go:54:3                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/input_test.go:51:3                      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/input_test.go:78:3                      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/output_test.go:32:3                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/processor_test.go:51:3                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/common/shim/processor_test.go:92:3                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/apcupsd/apcupsd_test.go:47:5                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/apcupsd/apcupsd_test.go:51:5                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/apcupsd/apcupsd_test.go:55:5                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/apcupsd/apcupsd_test.go:62:6                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/chrony/chrony_test.go:746:5                  testifylint  go-require: s.serve contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dovecot/dovecot_test.go:62:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/dovecot/dovecot_test.go:65:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/dovecot/dovecot_test.go:71:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/dovecot/dovecot_test.go:76:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/dovecot/dovecot_test.go:80:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_connector_test.go:99:6             testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:151:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:200:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:226:7                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:245:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:258:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:278:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:279:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/dpdk/dpdk_test.go:306:6                      testifylint  go-require: simulateSocketResponse contains assertions that must only be used in the goroutine running the test function
plugins/inputs/execd/shim/shim_posix_test.go:40:5           testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/execd/shim/shim_test.go:77:3                 testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:99:3                       testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:158:3                      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:1015:5                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:1067:3                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:1099:3                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/gnmi/gnmi_test.go:1203:5                     testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/hddtemp/go-hddtemp/hddtemp_test.go:83:3      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/hddtemp/go-hddtemp/hddtemp_test.go:86:3      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/hddtemp/go-hddtemp/hddtemp_test.go:87:3      testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/intel_dlb/intel_dlb_test.go:429:6            testifylint  go-require: simulateSocketResponseForGather contains assertions that must only be used in the goroutine running the test function
plugins/inputs/kafka_consumer/kafka_consumer_test.go:358:3  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/kafka_consumer/kafka_consumer_test.go:359:3  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/net_response/net_response_test.go:109:5      testifylint  go-require: TCPServer contains assertions that must only be used in the goroutine running the test function
plugins/inputs/net_response/net_response_test.go:154:5      testifylint  go-require: TCPServer contains assertions that must only be used in the goroutine running the test function
plugins/inputs/net_response/net_response_test.go:236:5      testifylint  go-require: UDPServer contains assertions that must only be used in the goroutine running the test function
plugins/inputs/radius/radius_test.go:53:5                   testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/radius/radius_test.go:121:5                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/statsd/statsd_test.go:206:5                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/statsd/statsd_test.go:243:5                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/statsd/statsd_test.go:280:5                  testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/teamspeak/teamspeak_test.go:64:5             testifylint  go-require: handleRequest contains assertions that must only be used in the goroutine running the test function
plugins/inputs/x509_cert/x509_cert_test.go:92:5             testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/x509_cert/x509_cert_test.go:103:5            testifylint  go-require: require must only be used in the goroutine running the test function
plugins/inputs/x509_cert/x509_cert_test.go:322:3            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 @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 b029889 into influxdata:master Oct 8, 2024
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.32.2 milestone Oct 8, 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
… `plugins/common` and `plugins/inputs` (#15991)

(cherry picked from commit b029889)
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