Commit Graph

223 Commits

Author SHA1 Message Date
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
Varsha Teratipally
94ff5ea1f1 change default container-runtime-endpoint to containerd.sock 2022-01-18 22:00:31 +00:00
Ciprian Hacman
a0abe5aa33 Clean up dockershim in tests
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2021-12-22 13:05:34 +02:00
Claudiu Belu
35e23afa50 tests: Prepull images commonly used test images
Some tests have a short timeout for starting the pods (1 minute), but if
those tests happen to be the first ones to run, and the images have to be
pulled, then the test could timeout, especially with larger images. This
commit will allow us to prepull commonly used E2E test images, so this issue
can be avoided.
2021-11-05 14:22:50 -07:00
Francesco Romani
54c7d8fbb1 e2e: TM: add option to fail instead of skip
The Topology Manager e2e tests wants to run on real multi-NUMA system
and want to consume real devices supported by device plugins; SRIOV
devices happen to be the most commonly available of such devices.

CI machines aren't multi NUMA nor expose SRIOV devices, so the biggest portion
of the tests will just skip, and we need to keep it like this until we
figure out how to enable these features.

However, some organizations can and want to run the testsuite on bare metal;
in this case, the current test will skip (not fail) with misconfigured
boxes, and this reports a misleading result. It will be much better to
fail if the test preconditions aren't met.

To satisfy both needs, we add an option, controlled by an environment
variable, to fail (not skip) if the machine on which the test run
doesn't meet the expectations (multi-NUMA, 4+ cores per NUMA cell,
expose SRIOV VFs).
We keep the old behaviour as default to keep being CI friendly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-09-13 13:23:36 +02:00
Sascha Grunert
484b027536
Remove unused --allow-gathering-profiles e2e.test flag
The profile gatherer has been removed in
https://github.com/kubernetes/kubernetes/pull/85304, so those options
are unused since then and can therefore be removed.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-08-31 11:33:33 +02:00
Niu Lechuan
12dcd2f84d Remove usage of github.com/pkg/errors
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2021-06-23 17:46:23 +08:00
Kubernetes Prow Robot
af60bebde3
Merge pull request #97028 from knabben/e2e-restart-kubelet
Adding restart kubelet flag on e2e test
2021-06-22 21:00:09 -07:00
Grant Griffiths
564e531aa7 Add Snapshot Controller e2e metric tests
Signed-off-by: Grant Griffiths <ggriffiths@purestorage.com>
2021-05-20 23:29:23 -07:00
Amim Knabben
0341e4c2f3 Enabling runtime config on E2E node tests 2021-03-08 15:45:06 -05:00
Kubernetes Prow Robot
26744ac58d
Merge pull request #98781 from smarterclayton/skip_all_nodes
Bug 1920221: Allow test invokers to skip test waits before and after
2021-02-05 06:32:52 -08:00
Clayton Coleman
9830cc911f
test/e2e: Allow zones to be passed to e2e cloud provider
Instead of allowing the cloud provider to guess at the zones that
should be applied for a cluster under test, allow the explicit list
of zones to consider to be passed as a new test context flag -gce-zones.

Only the GCE test cloud provider recognizes this value because only
the GCE test cloud provider makes assumptions about zones for verifying
values, and the default assumptions for GKE do not always match non-GKE
providers.
2021-02-04 21:53:54 -05:00
Clayton Coleman
286d989d8d
test/e2e: Allow test invokers to skip test waits before and after
A number of e2e tests are useful to run after the system has been
disrupted or is in the progress of being disrupted, but the current
suite and test logic blocks progress waiting for all nodes to be
healthy.

By passing -1 to --minStartupPods or --allowed-not-ready-nodes flags
the caller can bypass wait logic before and after test suites that
would prevent running e2e during disruption. This allows use of parts
of the e2e suite during cluster duress to verify that controllers or
components still function.
2021-02-04 20:14:05 -05:00
Clayton Coleman
02a13a4a39
test/e2e/framework: Log arguments at a higher level
Both of these are explicit arguments and are more elegantly logged
in a test framework by logging the arguments to the test.

The namespaces to be deleted are already logged inside
WaitForNamespacesDeleted
2021-01-20 14:48:46 -05:00
Amim Knabben
00da68dbc2 Adding restart kubelet flag on e2e test 2020-12-02 18:05:22 -05:00
jay vyas
0663e190ec Update to include windows / description of how NodeOSDistro is used in the e2es 2020-11-18 15:45:03 -05:00
Kubernetes Prow Robot
ba645bb939
Merge pull request #95993 from serathius/datapolicy-e2e-framework
Add datapolicy tags to test/e2e/framework
2020-11-05 06:31:22 -08:00
Morgan Bauer
9b8c1dcd19
reenable e2e_node services & debugging improvements
- re-enable e2e_node services
 - call GenerateSecureToken for e2e_node Conformance test-suite
 - add log messages indicating location in process
 - move log messages to some more accurate locations
2020-11-03 10:09:56 -08:00
Marek Siarkowicz
7f59610f49 Add datapolicy tags to test/e2e/framework 2020-10-29 18:08:32 +01:00
knight42
d321ac52a2
refactor: migrate node e2e tests off insecure port
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-10-20 00:12:58 +08:00
Ciprian Hacman
33ac3c36cc Add new flags for node arch 2020-07-13 20:25:14 +03:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Lubomir I. Ivanov
820c87c069 remove kubernetes-anywhere from this repository
The project has been deprecated since Dec 2018 and is unused.

Cleanup in:
- /test/e2e/framework/
- /cluster/
2020-04-21 22:52:51 +03:00
Davanum Srinivas
d1c948acdc
Add support for listing conformance tests
we print yaml, so you can use yaml tools like `yq`:
```
e2e.test --list-conformance-tests | yq r - --collect *.testname
```

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-01 10:48:53 -04:00
Claudiu Belu
1a8183d262 tests: Adds configurable docker conf for test
The image "gcr.io/authenticated-image-pulling/windows-nanoserver:v1" is not a
manifest list, and it is only useful for Windows Server 1809, which means that the
test "should be able to pull from private registry with secret" will fail for
environments with Windows Server 1903, 1909, or any other future version we might
want to test.

This commit adds the the ability to have an alternative private image to pull by
using a configurable docker config file which contains the necessary credentials
needed to pull the image.
2020-02-22 22:21:28 -08:00
John Schnake
2683b1065c Update the conformance list and doc generation logic
The existing walk.go and conformance.txt have a few shortcomings
which we'd like to resolve:
 - difficult to get the full test name due to test context nesting
 - complicated AST logic and understanding necessary due to the
different ways a test can be invoked and written

This changes the AST parsing logic to be much more simple and simply
looks for the comments at/around a specific line. This file/line
information (and the full test name) is gathered by a custom ginkgo
reporter which dumps the SpecSummary data to a file.

Also, the SpecSummary dump can, itself, be potentially useful for
other post-processing and debugging tasks.

Signed-off-by: John Schnake <jschnake@vmware.com>
2020-02-24 14:00:44 -08:00
Francesco Romani
1b5801a086 e2e: topomgr: add option to specify the SRIOV conf
We cannot anticipate all the possible configurations
needed by the SRIOV device plugin: there is too much variety.

Hence, we need to allow the test environment to supply
a host-specific ConfigMap to properly configure the device
plugin and avoid false negatives.

We still provide a the default config map as fallback and reference.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00
Christian Huffman
3db91b2bdc Enabled reading config files for vsphere e2e tests 2020-01-08 09:00:40 -05:00
Marek Siarkowicz
31fb04fa98 Remove cluster-monitoring
Heapster is deprecated and no longer supported
2019-12-09 11:25:20 +01:00
Kenichi Omichi
aef8355358 Move RegisterNodeFlags() to e2e_node test
RegisterNodeFlags() is called in e2e_node test package only, so this
moves the function for making e2e core framework small and simple.
2019-11-14 18:11:21 +00:00
John Schnake
ed1d5270b3 Print progress updates to stdout and publish to URL
One common frustration of end users running the e2e suite is that
they take a significant amount of time and it is difficult to
gauge progress.

Even if tailing the logs it can be difficult to see where one
test starts and another ends or understand the if there have been
failures in the past 1h of logs.

This change adds a new custom reporter which prints summary information
as tests complete. This includes the number of tests to run and how
many have been passed/failed/skipped along with which tests have failed.

A new flag can be set which pushes these values to an endpoint. This is
intended for integration with Sonobuoy but any endpoint could consume and
surface this data to the user so they can better understand the state
of the current test run.
2019-11-09 15:35:08 -06:00
Kubernetes Prow Robot
a8e819746d
Merge pull request #83442 from serathius/remove-prometheus-addon
Remove prometheus addon
2019-10-29 01:34:43 -07:00
Kubernetes Prow Robot
0f7873ad5c
Merge pull request #82308 from zhlhahaha/kubectl_flag
Add kubectlPath flag to e2e_node.test
2019-10-18 23:47:37 -07:00
Howard Zhang
1c9da19bf5 Add kubectlPath flag to e2e_node.test
e2e_node.test does not set default kubectlPath, which lead to test
errors as following:
[Fail] [sig-storage] EmptyDir volumes [It] pod should support
shared volumes between containers [Conformance]

When the test trying to read file in shared volume, it uses
"kubeclt exec namespace -c container_name -- cat file_name".
However, as variable framework.TestContext.KubectlPath not set,
kubectl binary can not be found in the test and the tast fails.

This patch move kubectlPath flag from RegisterClusterFlags to
RegisterCommonFlags, thus default value for
framework.TestContext.KubectlPath will be set,and
user can also use --kubectl-path flag to set kubectl path.

Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2019-10-17 11:29:44 +08:00
Marek Siarkowicz
887e84e330 Remove Prometheus addon and it's tests
Prometheus addon was developed for exterimental and test purpose only.
As readme states it should not be used by anyone.
2019-10-03 14:15:58 +02:00
Kenichi Omichi
6499f93266 Use log functions of core framework on [r-u]
This makes sub packages of e2e test framework to use log functions
of core framework instead for avoiding circular dependencies.
2019-09-26 18:17:10 +00:00
Kubernetes Prow Robot
4ab4e201aa
Merge pull request #82060 from aojea/isipv6method
Add a method to TestContext to check if is IPv6
2019-09-11 10:38:48 -07:00
John Schnake
3c53481d5c Move from regexp to csv string 2019-09-05 14:37:16 -05:00
John Schnake
8772187680 Add new flag for whitelisting node taints
Adds a new flag which allows users to specify a regexp
which will effectively whitelist certain taints and
allow the test framework to startup tests despite having
tainted nodes.

Fixes an issue where e2e tests were unable to be run
in tainted environments due to the framework waiting for
all the nodes to be schedulable without any tolerations.
2019-08-30 11:15:42 -05:00
Antonio Ojea
45d6f08868
Add a method to TestContext to check if is IPv6 2019-08-27 15:41:10 +02:00
Kenichi Omichi
c76291b8d3 Move HandleFlags to e2e package
HandleFlags() was used at e2e package and it depends on sub e2e
framework "config" in core e2e framework. That was invalid dependency.
So this moves HandleFlags() to e2e package for simple dependency.
2019-08-16 16:43:50 +00:00
Kubernetes Prow Robot
1e962072f1
Merge pull request #79909 from vinicyusmacedo/simplify-e2e
Moving e2e boilerplate to separate functions
2019-08-07 04:46:50 -07:00
moriadry
4b8080dda8 Fix error collides with imported package name
Fix error collides with imported package name

fix

fix
2019-08-06 12:20:29 +08:00
Vinicyus Macedo
0f21b692e4 Moved e2e boilerplate to framework 2019-08-05 16:23:56 -03:00
Antonio Ojea
bd15f3f9f7
Clarify IP family meaning 2019-07-25 16:14:57 +02:00
Antonio Ojea
daff471766
e2e: Autodetect the IP family of the cluster 2019-07-23 20:09:19 +02:00
Patrick Ohly
b86a007057 e2e: avoid mandatory command line flags
Tests should never directly add to the global command line, because
some users of the tests might not want them there. For example,
options might only get set directly from a config file.

To achieve that, e2e/framework/config, e2e/framework/viperconfig, and
e2e/framework/test_context.go avoid using the global flag set and
instead expect to be told by the caller which flag set to use. Tests
that called flag directly either get updated or obsolete flags get
removed.

The exception is framework.HandleFlags, which as before directly
implements global command line handling.

This is a breaking change for test suites which do not use that
function (and only those): they now need to ensure that they copy
individual flags from tests. Because the RegisterCommonFlags prototype
has changed, test suite authors will notice due to the resulting
compilation errors.
2019-07-04 17:15:14 +02:00
Haosdent Huang
7ce6e71891 Fix typos. 2019-06-11 01:52:14 +08:00
SataQiu
d3a902ff5b e2e refactor: cleanup Logf form framework/util 2019-05-24 16:39:46 +08:00
SataQiu
a232c3266d fix golint failures of e2e/framework/test_context.go 2019-03-29 14:41:24 +08:00