mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-21 09:29:43 -04:00
The logtools linter broke a while ago when moving to more recent Go and/or more
recent dependencies such that it stopped reporting certain issues. This was
only noticed much later when a broken log call was found in the code base which
should have been flagged as wrong by the linter.
It is possible to run upstream Go unit tests in a downstream project. This is
now done for logtools if (and only if) no explicit test targets are
selected. Because hack/tools is not part of the workspace, this only works
after changing directories. gotestsum gets invoked once for the root and this
additional directory with different result files and set of test targets.
We could add more upstream tests. etcd tests were mentioned as something where
that would be useful. However, right now upstream etcd tests have some
dependencies on being run inside the original source tree, so that would have
to be fixed first. For now only single etcd client package gets tests as
a proof-of-concept of the new support for testing vendored upstream packages.
For those, -mod=readonly is needed to avoid:
$ go test go.etcd.io/etcd/client/pkg/v3/fileutil
? go.etcd.io/etcd/client/pkg/v3/fileutil [no test files]
|
||
|---|---|---|
| .. | ||
| build.sh | ||
| clean.sh | ||
| cross.sh | ||
| make-help.sh | ||
| test-cmd.sh | ||
| test-e2e-node.sh | ||
| test-integration.sh | ||
| test.sh | ||
| update.sh | ||
| verify.sh | ||