Closed swallowstalker closed 1 year ago
let's go with option 1. initially, we have unit tests in the repository package but we migrated to integration test since it gives more confidence and is simpler (don't have to write expected SQL), we don't want to go back to unit tests 🙂
@rahmatrhd sure, i think i can create new PR for adding the short flag
Summary
Our team has a problem when running unit test on CI, as the repository package test tries to access
/var/run/docker.sock
everytime we runmake test
. I think it is plausible to disable this during unit test since dockertest usage is intended for integration test.Proposed solution
go test -short
flag. But this means the repository won't be tested every time we use this flagAdditional context
For context, our team needs strong reason on why we should enable access to dockers and Guardian's dependencies during unit test, to change the CI configs