Commit Graph

282 Commits

Author SHA1 Message Date
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Eric Ernst
e5760015d2 e2e-framework-node: add runtimeclass to dedup code
Similar functionality is required across e2e tests for RuntimeClass.
Let's create runtimeclass as part of the framework/node package.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-02-20 15:58:52 -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
Lubomir I. Ivanov
2b389123a5 test/e2e/framework: handle the case where BeforeEach was never called
Some tests under e2e/storage never end up calling the
Framework#BeforeEach() prolog. Handle such cases by returning
early in AfterEach() by checking a new field "beforeEachStarted".

Also add a nil check for ClientSet in AfterEach().
2020-01-25 00:35:26 +02:00
David Eads
773fbeab1e expose the clientConfig to consumers trying to build custom clients against the kubeapiserver 2019-12-11 16:10:36 -05:00
David Eads
d0210220e4 dump information for all namespaces related to the test 2019-12-11 16:00:57 -05:00
David Eads
ea913f38ea allow configuration of customized AfterEach functions for all tests 2019-12-11 15:53:00 -05:00
Kubernetes Prow Robot
541b4e4b39
Merge pull request #85542 from schrodit/e2e-dump-ns
Dump namespace if the namespace could not be cleaned up
2019-12-10 16:05:20 -08:00
MorrisLaw
b85adbf1fd moved WriteFileViaContainer and ReadFileViaContainer to kubectl_utils 2019-12-04 20:31:57 +00:00
MorrisLaw
4b99e5305e remove CheckFileSizeViaContainer from framework 2019-12-04 20:30:51 +00:00
MorrisLaw
cd8da67b03 move KubectlCmd out of utils into its own package 2019-12-04 20:30:43 +00:00
Tim Schrodi
c3c7ea2efd Dump namespace if the namespace could not be cleaned up 2019-11-22 12:14:28 +01:00
Kenichi Omichi
8f32ee183f Add TODOs for removing invalid e2e dependencies
The e2e core framework and subpackages of e2e framework are defined.
The subpackages can import the core framework, but the core framework
should not import the subpackages. We've defined this dependency rule
after circular depencency issue happened.
This adds TODOs to understand what we should in this rule.
2019-11-13 19:34:08 +00:00
Kenichi Omichi
94211f1839 Move functions from e2e framework util.go
The following functions are called at some specific places only,
so this moves these functions to the places and makes them local.

- WaitForPersistentVolumeClaimDeleted: Moved to e2e storage
- PrintSummaries: Moved to e2e framework.go
- GetHostExternalAddress: Moved to e2e node
- WaitForMasters: Moved to e2e cloud gcp
- WaitForApiserverUp: Moved to e2e network
- WaitForKubeletUp: Moved to e2e storage vsphere
2019-11-08 19:25:16 +00:00
Kubernetes Prow Robot
74cbf0dc33
Merge pull request #84745 from davidz627/revert-84656-fix/syncReal
Revert "Make writing file via container in tests sync for real this time by enclosing multiple commands in quotes"
2019-11-05 15:31:41 -08:00
Kubernetes Prow Robot
e52df5bcc3
Merge pull request #84725 from liggitt/e2e-useragent
Set user agent for e2e consistently
2019-11-05 11:44:40 -08:00
David Zhu
c23c4296d1
Revert "Make writing file via container in tests sync for real this time by enclosing multiple commands in quotes" 2019-11-04 11:26:34 -08:00
Jordan Liggitt
300daa13a4 Set user agent for e2e consistently 2019-11-04 09:11:20 -05:00
David Zhu
1f1859f937 Make writing file via container in tests sync for real this time 2019-11-01 11:35:22 -07:00
clarklee92
358dec9f3d Use log functions of core framework on test/e2e/freamwork/psp.go
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-10-31 17:43:09 +08:00
Kubernetes Prow Robot
c06f552e49
Merge pull request #84491 from davidz627/fix/verifyLoop
Force file sync after writing file via container in test
2019-10-30 21:55:50 -07:00
David Zhu
e3d2432e01 Force file sync after writing file via container and wait for pod to
disappear after removal in test
2019-10-30 15:40:53 -07:00
Jianfei Bai
586261291f Remove unused functions in framework.go 2019-10-29 11:44:27 +08:00
Ted Yu
79359773f6 Reset default namespace deletion timeout to 5 minutes 2019-10-02 19:48:06 -07:00
Clayton Coleman
67283da28b
test/e2e: Delete test namespaces asynchronously
Now that namespace deletion is reliable, use the suite tear down
to catch non terminated namespaces and stop waiting within each test
for deletion.

Serial tests that need a clean set of namespaces must use the
appropriate flag to control whether they wait for clean namespaces
on startup.
2019-09-27 15:58:05 -04:00
Dan Winship
3c445b2ad0 Add e2enode.GetBoundedReadySchedulableNodes, replace some uses of framework.GetReadySchedulableNodesOrDie
For tests that want at-most-N nodes
2019-09-24 13:03:40 -04:00
draveness
702646df24 test(runtimeclass): add e2e tests for runtimeclass scheduling 2019-09-01 16:41:48 +08:00
Kenichi Omichi
f3f14f9698 Use log functions of core framework on [c-n]
This makes sub packages of e2e test framework to use log functions
of core framework instead for avoiding circular dependencies.
2019-08-21 00:55:32 +00:00
Kenichi Omichi
47a4d1a8ec Rename MetricsForE2E for golint failure
This renames MetricsForE2E to ComponentCollection for solving golint
failure.
2019-08-08 04:15:36 +00: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
WanLinghao
d288bc0368 Refactor and clean up e2e framework utils, this patch handles test/e2e/framework/psp_util.go file 2019-07-27 16:24:08 +08:00
Kubernetes Prow Robot
febc95282a
Merge pull request #80331 from wongma7/framework-panic
Surface error returned by LoadConfig
2019-07-19 21:24:54 -07:00
Matthew Wong
84b53966fd Surface error returned by LoadConfig 2019-07-18 16:54:28 -07: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
492c8c6f24 e2e: remove framework.Failf 2019-06-22 21:33:16 +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
SataQiu
d3a902ff5b e2e refactor: cleanup Logf form framework/util 2019-05-24 16:39:46 +08:00
Lubomir I. Ivanov
760a825f7c e2e-test-framework: decouple the aggregated clientset from the framework
Remove usage of the aggregated clientset in the e2e testing framework
itself. We have one test that consumes the clientset in the suite
and it's in test/e2e/apimachinery/aggregator.go, which was recently
promoted to conformance in 8101b86.

This test now obtains a local copy of the aggregated clientset.
The suite still has to compile the internal client in.
One possible solution here is to move this test in a separate suite,
yet it's unclear of how to tackle the problem now that the test
has to run as part of the conformance suite.
2019-04-16 18:05:09 +03:00
SataQiu
1405819049 fix golint failures of test/e2e/framework/framework.go 2019-04-08 15:11:37 +08:00
Kubernetes Prow Robot
4d73d99fd7
Merge pull request #75705 from oomichi/golint-e2e-framework-f
Fix golint failures of e2e/framework/f*.go
2019-04-05 10:21:20 -07:00
Andrew Sy Kim
4ac9feb7f9 test/e2e: replace legacy scheme with client-go scheme
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-04-02 10:08:55 -04:00
Kubernetes Prow Robot
5d77a5217a
Merge pull request #75616 from andrewsykim/e2e-remove-internal-clientset
remove usages of internal clientset in e2e framework
2019-04-01 15:48:36 -07:00
Kenichi Omichi
a81dd53e53 Fix golint failures of e2e/framework/p*.go
This fixes golint failures of
- test/e2e/framework/perf_util.go
- test/e2e/framework/pods.go
- test/e2e/framework/profile_gatherer.go
- test/e2e/framework/provider.go
- test/e2e/framework/psp_util.go
2019-03-29 18:50:01 +00:00
Andrew Sy Kim
1470df7a05 remove usages of internal clientset in e2e framework
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-03-28 21:13:40 -04:00
Kenichi Omichi
e28fb1a1f4 Fix golint failures of e2e/framework/f*.go
This fixes golint failures of the following files:
- test/e2e/framework/flake_reporting_util.go
- test/e2e/framework/framework.go
2019-03-25 23:21:33 +00:00
Patrick Ohly
e8a7cee43e test: remove k8s.io/apiextensions-apiserver from framework
There are two reason why this is useful:

1. less code to vendor into external users of the framework

The following dependencies become obsolete due to this change (from `dep`):

(8/23) Removed unused project github.com/grpc-ecosystem/go-grpc-prometheus
(9/23) Removed unused project github.com/coreos/etcd
(10/23) Removed unused project github.com/globalsign/mgo
(11/23) Removed unused project github.com/go-openapi/strfmt
(12/23) Removed unused project github.com/asaskevich/govalidator
(13/23) Removed unused project github.com/mitchellh/mapstructure
(14/23) Removed unused project github.com/NYTimes/gziphandler
(15/23) Removed unused project gopkg.in/natefinch/lumberjack.v2
(16/23) Removed unused project github.com/go-openapi/errors
(17/23) Removed unused project github.com/go-openapi/analysis
(18/23) Removed unused project github.com/go-openapi/runtime
(19/23) Removed unused project sigs.k8s.io/structured-merge-diff
(20/23) Removed unused project github.com/go-openapi/validate
(21/23) Removed unused project github.com/coreos/go-systemd
(22/23) Removed unused project github.com/go-openapi/loads
(23/23) Removed unused project github.com/munnerz/goautoneg

2. works around https://github.com/kubernetes/kubernetes/issues/75338
   which currently breaks vendoring

Some recent changes to crd_util.go must now be pulling in the broken
k8s.io/apiextensions-apiserver packages, because it was still working
in revision 2e90d92db9 (as demonstrated by
586ae281ac).
2019-03-13 19:05:13 +01:00
Tim Allclair
222988bdda Migrate to internal node.k8s.io client 2019-03-07 11:57:12 -08:00
Xing Yang
6265f4f78c CSINodeInfo/CSIDriver controller changes
This is the 2nd PR to move CSINodeInfo/CSIDriver APIs to
v1beta1 core storage APIs. It includes controller side changes.
It depends on the PR with API changes:
https://github.com/kubernetes/kubernetes/pull/73883
2019-03-04 16:41:58 -08:00
Vu Cong Tuan
c747b7f38d Fix many typos in both code and comments
Signed-off-by: Vu Cong Tuan <tuanvc@vn.fujitsu.com>
2019-02-27 14:41:02 +07:00
Kubernetes Prow Robot
9e55995a31
Merge pull request #73989 from oomichi/golint-e2e-framework-metrics
Fix golint failures under test/e2e/framework/metrics
2019-02-19 16:23:48 -08:00
Kenichi Omichi
2635b6d95c Use framework.ExpectNoError() instead Expect()
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it.
2019-02-15 16:52:57 +00:00
Kenichi Omichi
89f6f1d0cc Fix golint failures under e2e/framework/metrics 2019-02-13 18:07:16 +00:00
Chao Xu
3f21ca029a changing imports 2019-02-12 10:06:04 -08:00
Tim Allclair
954f43a10d Migrate RuntimeClass E2E to typed client 2019-01-24 11:08:30 -08:00
Patrick Ohly
1effe0ca0f e2e framework: UniqueName
This is needed for tests which have to create entities that aren't
namespaced, like ServiceAccounts.
2018-10-26 10:32:46 +02:00
k8s-ci-robot
8b36038b41
Merge pull request #68483 from pohly/e2e-refactor-pr
e2e refactor
2018-10-19 12:32:01 -07:00
mooncake
91419e6782 Fix typos in the test comments
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-10-11 19:25:55 +08: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
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Chris O'Haver
9060fc6e6d add opt to track dns pods 2018-10-01 10:00:16 -04:00
Francois Tur
5c20fff19d
Revert "Add DNS pod resource monitoring option" 2018-09-19 14:54:29 -04:00
k8s-ci-robot
ab02fd6f8a
Merge pull request #68683 from chrisohaver/trackdns
Add DNS pod resource monitoring option
2018-09-19 09:47:29 -07:00
Cheng Xing
4ff1e32974 Updating CSI e2e test to create CSI CRDs; storing CRD spec in a common location 2018-09-18 14:25:00 -07:00
Chris O'Haver
fd73e6f291 dont merge this commit 2018-09-18 09:37:27 -04:00
Chris O'Haver
af0c1d2a4c Add dns pod monitoring option 2018-09-17 12:52:05 -04:00
Kubernetes Submit Queue
59bcf0dadf
Merge pull request #67950 from dims/remove-e2e-image-puller
Automatic merge from submit-queue (batch tested with PRs 67950, 68195). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Remove e2e-image-puller

**What this PR does / why we need it**:

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #63355

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-09-07 11:19:36 -07:00
Jan Safranek
f1cef9bde4 Add e2e test for skipping attach 2018-09-05 10:35:54 -04: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
Hippie Hacker
229ecedac5 Add Test Description to e2e User-Agent
Co-Authored-By: Guinevere Saenger <guineveresaenger@gmail.com>
2018-08-22 01:54:07 +00:00
hangaoshuai
fed9411d5d use const v1.ProtocolTCP replace of string TCP 2018-08-07 12:09:19 +08:00
Shyam Jeedigunta
a80c34b146 Add flake-reporting utility to testing framework 2018-07-23 16:24:35 +02:00
Tim Hockin
d33e57d2c8 Better log line in e2e 2018-06-07 17:01:49 -07:00
David Eads
fd044d152e fix dynamic client name 2018-05-11 13:12:09 -04:00
David Eads
dd97a7bc59 move client based restmappers to client-go 2018-05-08 08:11:56 -04:00
Kubernetes Submit Queue
6b9cf21d9f
Merge pull request #63203 from deads2k/api-07-versioninterface
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove versioning interface

Builds on prior restmapping/converter separation to completely remove the versioning interface which isn't needed.

intersection of @kubernetes/sig-api-machinery-pr-reviews and @kubernetes/sig-cli-maintainers  again

```release-note
NONE
```
2018-04-27 09:15:13 -07:00
David Eads
e2fc5cf259 remove versioning interface 2018-04-27 07:56:42 -04:00
xuzhonghu
393324497f make use of simple dynamic client in test 2018-04-27 13:38:58 +08:00
Clayton Coleman
565f97bf68
Allow a test suite reusing framework to register namespaces to delete
If the suite bypasses CreateNamespace (because it wants to create more
specialized namespaces) it has no way to register deletes.
2018-04-15 20:15:38 -04:00
Solly Ross
e225bbf1a3 Reset DeferredDiscoveryRESTMapper before use
DeferredDiscoveryRESTMapper won't automatically `Reset` itself before its
initial use, since actually trying to construct the delegate will error
out before it gets a chance to `Reset` itself.  Ergo, we have to
manually call `Reset` before use.
2018-01-30 11:53:20 -05:00
Rohit Agarwal
d191c57cad Add e2e tests for GPU monitoring. 2018-01-26 15:30:55 -08:00
p0lyn0mial
dd9de90b0a the changes introduced in this commit plumbs in the generic scaler into kubectl.
note that we don't change the behaviour of kubectl.
For example it won't scale new resources. That's the end goal.
The first step is to retrofit existing code to use the generic scaler.
2018-01-12 09:21:18 +01:00
Jordan Liggitt
3d5288ebf3
Check ns setup error during e2e 2017-12-12 13:20:56 -05:00
Shyam Jeedigunta
fce28995e1 Control logs verbosity in resource gatherer 2017-11-17 13:03:32 +01:00
Shyam Jeedigunta
a350825612 Restore default polling period of resource-gatherer 2017-11-15 23:15:28 +01:00
Jiaying Zhang
ae36f8ee95 Extend test/e2e/scheduling/nvidia-gpus.go to track resource usage of
installer and device plugin containers.
To support this, exports certain functions and fields in
framework/resource_usage_gatherer.go so that it can be used in any
e2e test to track any specified pod resource usage with the specified
probe interval and duration.
2017-11-13 16:24:41 -08:00
Tim Allclair
671a6aa068
PodSecurityPolicy E2E tests 2017-11-01 16:00:32 -07:00
Matt Liggett
a5967cbaf1 Add framework.ConformanceIt as the new way to declare conformance tests.
Also rewrite all existing conformance tests to use this.
2017-10-27 15:29:59 -07:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
jeff vance
d7e18ac5d0 wait for pod to be fully deleted 2017-10-10 10:58:50 -07:00
Chao Xu
6c5a8d5db9 Remove the conversion of client config, because client-go is authoratative now 2017-09-12 16:02:17 -07:00
Walter Fender
cb28f0f34f Add e2e aggregator test.
What this PR does / why we need it:
This adds an e2e test for aggregation based on the sample-apiserver.
Currently is uses a sample-apiserver built as of 1.7.
This should ensure that the aggregation system works end-to-end.
It will also help detect if we break "old" extension api servers.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes
fixes #43714
Fixed bazel for the change.
Fixed # of args issue from govet.
Added code to test dynamic.Client.
2017-08-17 10:56:43 -07:00
Kubernetes Submit Queue
eb700d86c5 Merge pull request #50440 from bskiba/kubemark_e2e_open
Automatic merge from submit-queue (batch tested with PRs 45186, 50440)

Add functionality needed by Cluster Autoscaler to Kubemark Provider.

Make adding nodes asynchronous. Add method for getting target
size of node group. Add method for getting node group for node.
Factor out some common code.

**Release note**:
```
NONE
```
2017-08-10 07:31:01 -07:00
Beata Skiba
20a3756024 Add functionality needed by Cluster Autoscaler to Kubemark Provider.
Make adding nodes asynchronous. Add method for getting target
size of node group. Add method for getting node group for node.
Factor out some common code.
2017-08-10 14:37:56 +02:00
Aleksandra Malinowska
55682f2a55 add grabbing CA metrics in e2e tests 2017-08-10 11:22:45 +02:00
Beata Skiba
2f747f3d3c Add a simple cloud provider for e2e tests on kubemark
This is needed for cluster autoscaler e2e test to
run on kubemark. We need the ability to add and
remove nodes and operate on nodegroups. Kubemark
does not provide this at the moment.
2017-08-07 16:31:02 +02:00
Mik Vyatskov
e79a228a78 Move the sig-instrumentation test to a dedicated folder 2017-08-07 10:33:03 +02:00
Shyam Jeedigunta
82f1012e74 Allow mode in e2e-framework to gather metrics only from master 2017-08-01 12:00:52 +02:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00