twoliter icon indicating copy to clipboard operation
twoliter copied to clipboard

Respect GO_MODULES environment variable when preparing modules from `sources` directory

Open cbgbt opened this issue 1 year ago • 2 comments

Issue number:

Closes #312

Description of changes:

  • twoliter: allow overriding GO_MODULES
  • docker-go: fix GOPATH to be set after arg parse

Testing done:

  • Provided unit tests pass

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

cbgbt avatar Jun 23 '24 19:06 cbgbt

I'm pretty sure my tests failed because tests are run concurrently and I'm modifying an environment variable during the test. I'll come up with a fix.

cbgbt avatar Jun 23 '24 20:06 cbgbt

I've decided that testing the environment variable modification in Rust unit tests is a terrible idea if we would like to have a future without flaky tests.

Instead, the environment searching feature is extracted to an additional function which I have tested manually.

cbgbt avatar Jun 23 '24 22:06 cbgbt