Commit Graph

787 Commits

Author SHA1 Message Date
Danielle Lancashire
1c5b77b0cb test-e2e-node: set ginkgo test timeout to 24h
Ginkgo v1 had a much longer default test timeout, in v2 this
switched to being 1 hour. This is not long enough to run many of our
suites.

Here we copy the backwards compatibility that is used by
hack/gingo-e2e.sh to unbreak serial pipelines.
2022-07-29 13:20:19 +00:00
Patrick Ohly
1aa58532c8 test: enable unit tests under test/e2e
The test/e2e directory contains several unit tests that should run as part of
"make test":

./test/e2e/chaosmonkey/chaosmonkey_test.go
./test/e2e/storage/external/external_test.go
./test/e2e/storage/utils/utils_test.go
./test/e2e/framework/log_test.go
./test/e2e/framework/testfiles/testfiles_test.go
./test/e2e/framework/timer/timer_test.go
./test/e2e/framework/node/wait_test.go
./test/e2e/framework/pod/resource_test.go
./test/e2e/framework/config/config_test.go
./test/e2e/framework/ingress/ingress_utils_test.go
./test/e2e/framework/providers/gce/firewall_test.go

Because they were excluded by "./test/e2e/*", some of them became outdated.

./test/e2e/e2e_test.go is the only test that needs to be excluded because it is
the E2E test suite that depends on a functional cluster.
2022-05-11 11:48:58 +02:00
Mario Jason Braganza
066fd90f26
add verify-licenses.sh to the EXCLUDED_PATTERNS in make-rules/verify.sh 2022-05-06 19:03:03 +05:30
Danielle Lancashire
f1f45df2c1 hack: make test-e2e-node: remove old project refs
This commit cleans up references to the old kubernetes-node-e2e-images
project. In the process it removes the `LIST_IMAGES` mode as listing
large numbers of public cloud projects is not particularly useful, and
has been somewhat broken for a long period of time - as we defaulted
launching a VM to a different project than listing.
2022-04-22 00:59:25 +02:00
Jordan Liggitt
975bfaf8ba set parallelism in integration tests with GOMAXPROCS 2022-04-01 12:55:41 -04:00
Davanum Srinivas
d20df79545
prune junit xml files in ci harness
Over time the size of our junit xml has exploded to the point where
test-grid fails to process them. We still have the original/full
*.stdout files from where the junit xml files are generated from so the
junit xml files need NOT have the fill/exact output for
processing/display. So let us prune the large messages with an
indicator that we have "[... clipped...]" some of the content so folks
can see that they have to consult the full *.stdout files.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-30 12:58:43 -04:00
Patrick Ohly
17e3c555c5 hack: integrate logcheck into golangci-lint
Running logcheck as part of golangci-lint has several advantages:
- faster checking because finding files and parsing is shared
  with other linters
- gets rid of the complex and buggy
  hack/verify-structured-logging.sh (https://github.com/kubernetes/kubernetes/issues/106746)
- support for // nolint:logcheck
- works with Go 1.18
2022-03-24 11:21:03 +01:00
Kir Kolyshkin
e3ed3ba7c9 update golangci-lint to 1.45.0
This should fix Go 1.18 compatibility woes.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-23 10:19:16 -07:00
Davanum Srinivas
0a5f9115f2
re-add govet and stable metrics
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-23 08:02:54 -04:00
Davanum Srinivas
031da66841
Temporarily ignore some verify failures in go1.18"
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-22 20:42:03 -04:00
Kubernetes Prow Robot
19935de5a9
Merge pull request #107410 from margocrawf/master
Ensure static certs in kubeconfig override exec plugin
2022-03-08 11:34:21 -08:00
Margo Crawford
f015fd66ce Check whether static cert is already configured in UpdateTransportConfig
- Also update test-cmd.sh to pass a signing ca to the kube controller
  manager, so CSRs work properly in integration tests.

Signed-off-by: Margo Crawford <margaretc@vmware.com>
2022-03-07 13:54:32 -08:00
Danielle Lancashire
9e5fac5bb2 make: test-e2e-node: default to containerd
Since removing dockershim, `make test-e2e-node` will fail by default as
there is no provided container runtime endpoint.

This commit defaults us to using containerd's default socket path as the
local test target, rather than failing hard.
2022-02-01 16:36:06 +01:00
Ciprian Hacman
d01e9cedb1 Clean up logic for deprecated flag --container-runtime in scripts
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-20 11:19:08 +02:00
Kubernetes Prow Robot
feb758027c
Merge pull request #106907 from cyclinder/remove_dockershim_flags
Clean up dockershim flags in the kubelet
2022-01-18 09:09:09 -08:00
cyclinder
07999dac70 Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-14 16:02:50 +02:00
Mike Spreitzer
e3fa01ff22 Make KUBE_TEST_ARGS come last, so that --args can be used 2022-01-13 00:13:59 -05:00
Ciprian Hacman
6cdb1c225d Clean up dockerless build tag
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2021-12-18 12:18:25 +02:00
Kubernetes Prow Robot
1d44a54505
Merge pull request #106559 from thockin/kfind-no-testdata
testdata dirs are not useful go code
2021-12-07 22:07:45 -08:00
Jonathan Lebon
3ebd93cd02 test-e2e-node: support pure SSH mode
Right now, `run_remote.go` only supports GCE instances. But actually
running the tests is completely independent of GCE and could work just
as well on any SSH-accessible machine.

This patch adds a new `--mode` switch, which defaults to `gce` for
backwards compatibility, but can be set to `ssh`. In that mode, the GCE
API is not used at all, and we simply connect to the hosts given via
`--hosts`.

This is still better than `run_local.go` because the latter mixes build
environment with test environment, which doesn't fit well with
container-optimized operating systems.

This is part of an effort to setup the e2e node tests on Fedora CoreOS
(see https://github.com/coreos/fedora-coreos-tracker/issues/990).

Patch best viewed with whitespace ignored.
2021-11-22 10:13:15 -05:00
Jonathan Lebon
e0723c1e64 test-e2e-node: add SSH_OPTIONS
This allows overriding the default options.
2021-11-22 10:13:13 -05:00
Tim Hockin
c6a8961534 testdata dirs are not useful go code
Minor.  This removes a few "testdata" dirs from .make/all_go_dirs.mk

-hack/make-rules/helpers/go2make/testdata/dir-with-gofiles
-test/conformance/testdata
-test/instrumentation/testdata/pkg/kubelet/metrics
-test/instrumentation/testdata/staging/src/k8s.io/metrics
-test/typecheck/testdata/bad
-test/typecheck/testdata/good
-test/typecheck/testdata/good/testdata
-vendor/k8s.io/kubectl/pkg/cmd/edit/testdata

This list of dirs is used to figure out which directories need codegen,
and none of these do.
2021-11-19 11:25:53 -08:00
Namanl2001
64a9988fce
small nit
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-11-16 22:23:52 +05:30
Namanl2001
b990d8109a
adding runtime-config
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-11-16 01:27:16 +05:30
Mike Spreitzer
dc07025470 Add periodic etcd scraping to integration tests
.. to help understand where and why things go bad.
2021-11-05 21:32:58 -04:00
Kubernetes Prow Robot
70e7876bef
Merge pull request #106099 from BenTheElder/bazel-linger-no-more
cleanup lingering bazel related scripts/references
2021-11-02 18:00:27 -07:00
Kubernetes Prow Robot
b489b03946
Merge pull request #105575 from endocrimes/dani/cleanup-launcher
Allow the e2e_node runner to receive a KubeletConfiguration rather than requiring flags
2021-11-02 18:00:10 -07:00
Benjamin Elder
71071d13ab remove make rule for test-e2e-kubeadm
this target depended on a broken binary and is clearly unused

kubeadm e2e development should be done with: https://github.com/kubernetes/kubeadm/tree/main/kinder
2021-11-02 12:04:14 -07:00
Benjamin Elder
a4476c8548 remove bazel from make clean, bazel is not in any supported branches 2021-11-02 11:41:32 -07:00
Benjamin Elder
69c3e1934c don't search under ./bazel-*, bazel is not in use. 2021-11-02 11:40:59 -07:00
Benjamin Elder
aa4d83961a remove hack/{update,verify}-bazel.sh
With Kubernetes 1.19.X no longer supported, there are no supported branches using bazel. Developers should not have errant bazel files, this will be left to reviewers to catch.
2021-11-02 11:38:42 -07:00
Danielle Lancashire
a4cf3a90a2 e2e_node: support passing kubelet-config-file to local runs 2021-11-02 15:10:29 +01:00
Danielle Lancashire
6e9e436026 e2e_node: kubelet config: move to file where possible 2021-11-02 15:10:28 +01:00
Danielle Lancashire
4097a3d472 e2e_node: allow customizing the base kubeletconfig
This commit forces Kubelet Configuration files to always be generated
and when possible will use the kubeletconfig file that has been provided
by the test orchestrator
2021-11-02 15:09:56 +01:00
Namanl2001
6d6bb48240
passing image-config-dir
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-30 01:23:02 +05:30
Namanl2001
d721796259
reverted previous commit change
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-20 01:05:41 +05:30
Namanl2001
c6e0564f53
adding quote in SSH_KEY
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 23:30:01 +05:30
Namanl2001
dda8248a0e
trying quoting
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 21:59:05 +05:30
Namanl2001
85d16760f0
adding defaultGceKey in remote/ssh.go
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 00:07:36 +05:30
Namanl2001
b99c2f4894
SSH_USER:-
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-14 23:59:57 +05:30
Namanl2001
be3c851085
ssh key
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-13 01:02:38 +05:30
Namanl2001
ec7ad7e9fb
adding key and user
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-12 22:31:12 +05:30
David Eads
156fefa36a add verify script to catch most validation mutations 2021-10-08 14:37:55 -04:00
Antonio Ojea
2fee0c45e6 skip hack/tools/vendor folder
The makefiles scripts create a variable with all the go files
that are part of the Kubernetes source tree, including staging.

As today, this variable has a size of < 100kb

wc .make/all_go_dirs.mk
2326  2326 98905 .make/all_go_dirs.mk

This variable is passed as argument in the Makefiles, where it
is expanded. In Linux, there is a limit to the max size of
the arguments MAX_ARG_STRLEN.

If the arguments go above 128k, you get a nice:

execvp: /usr/bin/env: Argument list too long

If you, for whatever reason, do some go mod vendor inside the
hack/tools folder, these files will be added to the variable
and most probably you'll go above the limit and get that error.

Then, you'll learn a lot about Makefils, shell expansion, strace,
execpve, ARG_MAX and MAX_ARG_STRLEN,until you realize what is
the real problem :).
2021-08-26 20:02:43 +02:00
Davanum Srinivas
75748c185e
enable verify-golangci-lint.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:53:33 -04:00
Benjamin Elder
8942cba24d log if we're running with -race 2021-06-18 14:49:53 -07:00
Benjamin Elder
4ee729ce5f disable race detector in test-cmd.sh 2021-06-18 14:49:53 -07:00
Benjamin Elder
55d2868e9d don't redundantly set KUBE_RACE in test-integration.sh 2021-06-18 14:49:52 -07:00
Benjamin Elder
3c44b86ad6 enable race detector by default in make test 2021-06-18 14:49:52 -07:00
Benjamin Elder
14085c50d3 bump KUBE_TIMEOUT to 180s
observed some timeouts with 170s still
2021-06-15 12:25:00 -07:00