Commit Graph

230 Commits

Author SHA1 Message Date
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