Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: [modules + integration] go mod test, execute all the unit tests of a module #31324

nim-nim opened this issue Apr 7, 2019 · 0 comments
modules NeedsInvestigation


Copy link

@nim-nim nim-nim commented Apr 7, 2019

This report is part of a series, filled at the request of @mdempsky, focused at making Go modules integrator-friendly.

Please do not close or mark it as duplicate before making sure you’ve read and understood the general context. A lot of work went into identifying problems points precisely.

Needed feature

Go needs an official go mod test command that executes all the unit tests of a particular Go module, to make sure it is healthy.


  • the input should be:
    • a module path, or
    • a module path + module version, or
    • the filesystem path of a specific mod module descriptor
      • either the go.mod file at the root of an unpacked module tree, or
      • a mod file inside a goproxy hierarchy
  • all the usual go test flags should apply
  • the command should allow selecting (or not) the following test sets:
    • unit tests. Tests, that only require the compiler
    • integration tests. Tests, that have more needs than just the compiler, and that will fail in a generic CI/CD environment:
      • internet access,
      • root access
      • some specific software instance
      • some credentials
      • etc
  • the command should work in secure no-internet-download mode. In that mode it should fail if one of the modules it needs for building is not available in the cache or configured goproxy (#31304) sources
    • it should not get stuck forever waiting on the CI/CD firewall to let go get download from the internet


Go modules are wonderful and exciting, until you realise they only deal with the code download part. One stills need to dissect individual Go packages in the next stages of a CI/CD Go-related job.

The Go module concept should be extended to the rest of Go code processing phases.

@nim-nim nim-nim changed the title cmd/go: [modules + integration] go mod test, execute all the unit tests of a Go module cmd/go: [modules + integration] go mod test, execute all the unit tests of a module Apr 7, 2019
@julieqiu julieqiu added the NeedsInvestigation label Apr 22, 2019
@julieqiu julieqiu added this to the Go1.13 milestone Apr 22, 2019
@andybons andybons removed this from the Go1.13 milestone Jul 8, 2019
@andybons andybons added this to the Go1.14 milestone Jul 8, 2019
@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
@ALTree ALTree added the modules label Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
modules NeedsInvestigation
None yet

No branches or pull requests

5 participants