Disable dockertest on repository test during unit test

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 run make test. I think it is plausible to disable this during unit test since dockertest usage is intended for integration test.

Proposed solution

  • Option 1: add short flag checks before running repository package test. If someone only wants to run unit tests, we can use go test -short flag. But this means the repository won't be tested every time we use this flag
  • Option 2: use sql mocking on repository package test, since this should be a unit test rather than integration test

Additional 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