Skip to content

Conversation

@tbauriedel
Copy link
Member

Remove unused variables in tests

@tbauriedel tbauriedel requested a review from martialblog July 24, 2023 13:18
@tbauriedel tbauriedel self-assigned this Jul 24, 2023
@martialblog
Copy link
Member

I will have a look at it this week. Not really sure what these test functions do.

@tbauriedel
Copy link
Member Author

Most (to my knowledge even all) just call their Collect() function without using the t *testing.T variable.

For the future, it would be appropriate to expand the tests somewhat at this point (as far as possible and necessary).

Copy link
Member

@martialblog martialblog left a comment

Choose a reason for hiding this comment

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

I think we should actually test/assert something here, right now this seems very useless... since it doesn't collect anything if called as such.

If we want to keep it, then maybe we could have a t.Log(c) to at least see what's going on.

@tbauriedel
Copy link
Member Author

We should rather tackle the whole thing directly once cleanly instead of just using the variable somehow.
I'll take care of the whole thing.

@martialblog martialblog force-pushed the fix/remove-unused-variables branch from 4d6c0e2 to 736cb2b Compare October 27, 2023 10:59
tbauriedel and others added 3 commits October 27, 2023 12:59
 - update golangci-lint version
 - update Action versions
 - remove snapshot modus
@martialblog martialblog force-pushed the fix/remove-unused-variables branch from 736cb2b to 4d56e9b Compare October 27, 2023 11:00
@martialblog
Copy link
Member

I updated the PR.

The Test functions now have more to do and use the testing.T object.

Plus some updates to the CI.

@martialblog martialblog merged commit 5b16bf6 into main Oct 27, 2023
@martialblog martialblog deleted the fix/remove-unused-variables branch October 27, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants