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

Open
nim-nim opened this Issue Apr 7, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@nim-nim
Copy link

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.

Constrains

  • 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

Motivation

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 this to the Go1.13 milestone Apr 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.