e2e_node.test depends on test/e2e_node/builder and test/e2e_node/remote because
test/e2e_node/services/ uses some small helper functions from those two
packages. But e2e_node.test itself never builds any Go binaries, nor does it
run remote testing - that functionality is provided by the separate
test/e2e_node/runner commands.
Therefore these two packages should not put their command line flags into
flag.CommandLine because then they show up in the command line of e2e_node test
unnecessarily.
This change removes the following flags from the e2e_node.test command line:
diff -r before/e2e_node after/e2e_node
7,8d6
< --build-only If true, build e2e_node_test.tar.gz and exit.
< --cleanup If true remove files from remote hosts and delete temporary instances (default true)
20d17
< --delete-instances If true, delete any instances created (default true)
42d38
< --ginkgo-flags string Passed to ginkgo to specify additional flags such as --skip=.
95d90
< --gubernator If true, output Gubernator link to view logs
97d91
< --hosts string hosts to test
99,100d92
< --image-config-dir string (optional) path to image config files
< --image-config-file string yaml file describing images to run
103d94
< --images string images to test
105,106d95
< --instance-name-prefix string prefix for instance names
< --k8s-bin-dir string Directory containing k8s kubelet binaries.
120d108
< --mode string Mode to operate in. One of gce|ssh. Defaults to gce (default "gce")
133d120
< --results-dir string Directory to scp test results to. (default "/tmp/")
142,145d128
< --ssh-env string Use predefined ssh options for environment. Options: gce
< --ssh-key string Path to ssh private key.
< --ssh-options string Commandline options passed to ssh.
< --ssh-user string Use predefined user for ssh.
160,161d142
< --target-build-arch string Target architecture for the test artifacts for dockerized build (default "linux/amd64")
< --test-timeout duration How long (in golang duration format) to wait for ginkgo tests to complete. (default 45m0s)
196d176
< --test_args string Space-separated list of arguments to pass to Ginkgo test runner.
198d177
< --use-dockerized-build Use dockerized build for test artifacts
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).
Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with
sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)
This may be unnecessary in some cases, but it's not wrong.
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).
Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with
sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)
This may be unnecessary in some cases, but it's not wrong.
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
* github.com/kubernetes/repo-infra
* k8s.io/gengo/
* k8s.io/kube-openapi/
* github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods
Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135