test: fix test names
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
This MR adds the missing Test
prefix to several functions in _test.go
files, so the go test
command correctly recognizes them as test functions.
Before (the command counts tests):
$ go test -list . | grep '^Test' | wc -l
1078
After:
$ go test -list . | grep '^Test' | wc -l
1088
These were identified with the help of the revive.get-return
linter, which I’ve enabled as well
$ golangci-lint run
cluster_agents_test.go:112:1: get-return: function 'GetClusterAgent' seems to be a getter but it does not return any result (revive)
cluster_agents_test.go:272:1: get-return: function 'GetAgentToken' seems to be a getter but it does not return any result (revive)
resource_milestone_events_test.go:74:1: get-return: function 'GetIssueMilestoneEvent' seems to be a getter but it does not return any result (revive)
resource_milestone_events_test.go:198:1: get-return: function 'GetMergeRequestMilestoneEvent' seems to be a getter but it does not return any result (revive)
4 issues:
* revive: 4
Edited by 🤖 GitLab Bot 🤖