Improve testing
iegomez opened this issue · comments
Ignacio Gómez commented
The test suite was written long ago while starting to develop this plugin and it hasn't aged well: I knew very little Go by then and there are some basic mistakes I did that are starting to creep into new changes. So testing needs a major refactor and rewrite that include at least these:
- Switch from
goconvey
to simple table driven tests and use something liketestify/assert
to ease checks. - Don't ask users to have every damn service running just so they can be sure tests are passing. Instead, build some Docker or similar environment where services are installed and ran for tests to be held.
- Leverage said environment to add a CI service such as
CircleCI
,Github actions
, etc., that will run the test suite for every PR commit and block merging on failure. - Refactor
go-auth.go
extracting initialization and other work to its own package so it may be properly tested.