Commit Graph

149 Commits

Author SHA1 Message Date
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
alejandrox1
bf984efcc7 Moved e2e/manifests to e2e test framework
The functionality included in the e2e/manifests is useful for writing
e2e tests and will be a good addition to the test framework as a
sub-package.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2020-04-09 20:48:52 -04:00
tanjunchen
59a183f6b3 test/e2e/framework move func logClusterImageSources to test/e2e/e2e.go 2020-03-31 11:34:24 +08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Kubernetes Prow Robot
9821d0e47e
Merge pull request #88486 from Jefftree/schnake-pr
Adds custom reporter and logic to generate conformance docs and list of tests
2020-02-26 11:53:35 -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
tanjunchen
119f4df9c5 test/e2e/framework:remove unused code and move const 2020-02-17 23:31:50 +08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
SataQiu
4325e8a452 e2e: use log functions of core framework on pv, testfiles and volume sub packages 2019-11-27 14:18:18 +08:00
Kubernetes Prow Robot
c7c0d09489
Merge pull request #85200 from SataQiu/refactor-e2e-kubectl-20191113
e2e: move LogFailedContainers out of e2e test framework util.go
2019-11-25 09:03:25 -08:00
SataQiu
50bc528a7e e2e: move LogFailedContainers out of e2e test framework util.go 2019-11-15 10:21:26 +08:00
Kenichi Omichi
34b05d36aa Move suites.go to e2e package
suites.go is used from e2e.go only and suites.go has invalid dependency
to subpackage of e2e framework as e2e core framework.
So this moves suites.go from e2e core framework.
2019-11-14 23:50:48 +00:00
Kenichi Omichi
74f68dfbce Move functions from e2e/framework/util.go Part-4
This is the last PR which moves functions from e2e/framework/util.go

- WaitForServiceWithSelector: Moved to e2e/cloud/gcp
- WaitForStatefulSetReplicasReady: Moved to e2e/storage
- WaitForRCToStabilize: Moved to e2e/kubectl
- CheckInvariants: Moved to e2e/common
- ContainerInitInvariant: Moved to e2e/common
- DumpEventsInNamespace: Renamed to local function
- WaitForDaemonSets: Moved to e2e/e2e.go
2019-11-12 19:25:23 +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
YuikoTakada
da89d212dd Move funcs of suites.go to e2e.go 2019-11-05 07:21:38 +00:00
Antonio Ojea
766d79bbf5
Make TestContext.IPFamily global for parallel testing
it turns out that the framework.TestContext.IPFamily variable is
not available for the DNS tests if they don't run in the initial
Ginkgo node when running in parallel.

We add a function to the framework to allow us to run command
only once per each Ginkgo node parallel execution.

It also adds a method to detect if the cluster is IPv6.

The use of the framework.TestContext.IPFamily variable guarantees
consistency all over the testing because this variable is only
assigned at the beginning of the testing.
2019-08-27 12:54:52 +02:00
Patrick Ohly
259bb3bef5 e2e: consistent failure logging
All failures are worth logging immediately, not just unexpected
errors. That helps understand tests that have long-running cleanup
operations with their own logging, because the failure will be visible
inside the test output.

The logging in framework.ExpectNoError also was rather poor, because
it only showed the error, but not the additional information about it.

Tests suites now should use log.Fail as Gomega failure handler instead
of ginkgowrapper.Fail. log.Fail will handle the logging for all
failures before proceeding to record the failure in Ginkgo.

Because logging is always done also after a test failure, additional
failures during cleanup are now visible. Ginkgo itself just ignores
them.
2019-08-26 12:38:35 +02: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
alejandrox1
348fd0805e Refactored metrics-related functions from framework/metrics_util.go
This a refactoring of framework/metrics_utils.go into framework/metrics.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-07-08 19:35:10 -04:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
Jorge Alarcon Ochoa
4969a05327 Refactored pod-related functions from framework/util.go
This a refactoring of framework/utils.go into framework/pod.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-05-30 09:30:26 -04:00
draveness
da7507500f refactor: use e2elog.Logf instead of framework.Logf 2019-05-07 08:15:31 +08:00
Akihito INOH
9d0bc4b8df Fix golint failures of e2e/framework/util.go - part1
This is a part of a series for fixing golint failures for util.go.
- fixes `should not use dot imports` about `ginkgo` and `gomega`
- fixes golint failures from top of file to line 1394 at original util.go

This fixes golint failures of the following file:
- test/e2e/framework/util.go

This changes following files because of change function name
in above file.
- test/e2e/e2e.go
- test/e2e/network/network_tiers.go
- test/e2e/network/service.go
2019-04-17 18:07:01 +09:00
Kubernetes Prow Robot
9c75270b2b
Merge pull request #74905 from stevesloka/numNodesLookup
If num-nodes is not set, then look up via API how many are scheduleable
2019-03-06 00:44:49 -08:00
Steve Sloka
3dfaed9f7e If num-nodes is set to '-1', then look up via API how many nodes are scheduleable
Signed-off-by: Steve Sloka <slokas@vmware.com>
2019-03-05 10:46:05 -05:00
Sandeep Sunny
c4ef9ad765 Change to unblock vsphere e2e tests 2019-03-01 17:27:15 +05:30
Kenichi Omichi
5c3b0c1eef Register openstack provider for e2e test
Since the commit f3d79e152e
openstack provider has been denied on e2e test runner.
However there are storage e2e tests which are related to
openstack. So this adds the registration of openstack
provider for e2e test.
2019-02-21 21:15:36 +00:00
Marek Counts
ba81a5409a move logs into component-base
all the code changes to move move /apiserver/pkg/util/logs into /component-base/logs
2019-01-17 09:16:21 -05:00
Maciej Borsz
9e493e169d Implement NodeKiller -- a util to simulate node failures. 2018-11-29 12:56:50 +01:00
Davanum Srinivas
954996e231
Move from glog to klog
- 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
2018-11-10 07:50:31 -05:00
k8s-ci-robot
8b36038b41
Merge pull request #68483 from pohly/e2e-refactor-pr
e2e refactor
2018-10-19 12:32:01 -07:00
Justin Santa Barbara
ee1b0c81a7 e2e: fix some small typos 2018-10-11 13:06:42 -07:00
Patrick Ohly
8b17db7e0c e2e: modular framework
Not all users of the E2E framework want to run cloud-provider specific
tests. By splitting out the code it becomes possible to decide in
a E2E test suite which providers are supported.

This is achieved in two ways:
- the framework calls certain functions through a provider
  interface instead of calling specific cloud provider functions
  directly
- tests that are cloud-provider specific directly import the
  new provider packages

The ingress test utilities are only needed by a few tests. Splitting
them out into a separate package makes the framework simpler for test
suites not using those tests.

Fixes: #66649
2018-10-11 11:16:11 +02:00
Davanum Srinivas
ae0dde5c7d
Remove e2e-image-puller
A long time ago, We added the image prepulling as a workaround due to
the overwhelming amount of flake caused by pulling during the tests.
This functionality has been broken for a while now when we switched to a
COS image where mounting `docker` binary into `busybox` stopped working.
So we just have dead code we should clean up.

Change-Id: I538171a5c1d9361eee7f9e0a99655b88b1721e3e
2018-09-03 20:43:54 -04:00
Maciej Borsz
0e04b4f31b In e2e framework, wait for kube-system daemonsets to be ready. 2018-08-16 15:20:23 +02:00
Ashley Gau
7beefd0c9c move NEG out of featuregate 2018-06-25 09:47:39 -07:00
Jordan Liggitt
eea04411c0
register client-go auth plugins for e2e 2018-05-12 00:46:51 -04:00
Ashley Gau
d5904e7a4e Remove validation of Alpha Feature Gates 2018-03-22 11:02:42 -07:00
Cheng Xing
bb0f819d0b Adding beta feature flag for regional PDs. 2018-02-26 15:28:23 -08:00
Cheng Xing
c08abb719f multi-zone PD e2e tests 2018-02-22 14:24:08 -08:00
Jeremy L. Morris
e724886ad5 Removed newlines from e2e log statements. 2018-02-17 22:25:38 -05:00
Ken'ichi Ohmichi
28465d8b39 Fix golint errors on test/e2e/e2e.go
When running golint on test/e2e/e2e.go, the following erros
were faced:

 $ golint e2e.go
 e2e.go:329:2: var metricsJson should be metricsJSON
 e2e.go:342:1: comment on exported function RunE2ETests should be of the
form "RunE2ETests ..."

This PR fixes them.
2018-01-11 10:13:10 -08:00
Michael Taufen
8ec1958667 All Kubelet flags should be explicitly registered
This explicitly registers Kubelet flags from libraries that were
registering flags globally, and stops parsing the global flag set.
In general, we should always be explicit about flags we register
and parse, so that we maintain control over our command-line API.
2018-01-09 17:37:34 -08:00
David Zhu
e5aec8645d Changed GetAllZones to only get zones with nodes that are currently
running (renamed to GetAllCurrentZones). Added E2E test to confirm this
behavior.

Added node informer to cloud-provider controller to keep track of zones
with k8s nodes in them.
2017-11-20 16:04:18 -08:00
Yanqiang Miao
16aa5820fb Correct clean up actions in e2e tests 2017-11-17 08:46:21 +08:00
Matt Liggett
c64a5e8620 Clarify what each "version" means.
Some folks were getting confused by this output.

Fixes #54821
2017-11-03 10:11:06 -07:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00