Refactor unit tests
What does this MR do?
Refactors the unit tests:
- Modifies some unit tests to call
t.Setenv
rather thanos.Setenv
. The former provides inbuilt cleanup and restores the previous value of the env var once the test has concluded. See !42 (comment 1212968032) - Uses table tests consistently.
- Uses
testify
consistently.
What are the relevant issue numbers?
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Lucas Charles