Commit Graph

829 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
tanjunchen
7ff3a1f8db test/e2e/framework: remove skip.go and use e2eskipper subpackage 2020-02-01 01:18:48 +08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
tanjunchen
ecfe31b890 /test/e2e/framework:remove TODO in test/e2e/framework/util.go 2020-01-24 23:56:16 +08:00
Jiaying Zhang
3698a2540d In test framework LoadConfig(), use CurrentContext.Server for TestContext.Host
if it is unset. Otherwise, kubectl exec through http/kubectl proxy tests in
test/e2e/kubectl/kubectl.go would fail with "--host variable must be set to
the full URI to the api server on e2e run" error.
With this change, running the following tests can now pass:
$ e2e.test --kubeconfig=xxx --ginkgo.focus="should support exec through"
2020-01-16 17:57:21 -08:00
tanjunchen
2371c58a73 remove unused code test/e2e/framework/google_compute.go 2020-01-03 19:04:28 +08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
hwdef
d45107a00d test/e2e: move funcs from test/e2e/pod to other folders 2019-12-16 11:58:49 +08:00
MorrisLaw
b85adbf1fd moved WriteFileViaContainer and ReadFileViaContainer to kubectl_utils 2019-12-04 20:31:57 +00:00
MorrisLaw
cd8da67b03 move KubectlCmd out of utils into its own package 2019-12-04 20:30:43 +00:00
SataQiu
50bc528a7e e2e: move LogFailedContainers out of e2e test framework util.go 2019-11-15 10:21:26 +08:00
Kubernetes Prow Robot
97225e2742
Merge pull request #85230 from oomichi/add-todo-issue81245
Add TODOs for removing invalid e2e dependencies
2019-11-14 13:31:41 -08:00
Kubernetes Prow Robot
c98d9b6fab
Merge pull request #85149 from oomichi/move-util-4
Move functions from e2e/framework/util.go Part-4
2019-11-13 20:01:58 -08: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
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
Kubernetes Prow Robot
6b642dae87
Merge pull request #84837 from justinsb/fix_get_kubelet_pods
e2e: Fix error where pods not logged
2019-11-12 10:23:28 -08:00
Kubernetes Prow Robot
afac2ca6a5
Merge pull request #85008 from oomichi/move-utils-3
Move functions from e2e/framework/util.go Part-3
2019-11-09 15:29:39 -08: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
Kenichi Omichi
5381f74641 Remove unused function from e2e framework util.go
The util.go file is so huge, it is better to make it small and simple
as possible for the maintenance.
This removes the following unused function:

- WaitForNodeHasTaintOrNot: Unused since 7e1794dcb1
2019-11-08 17:47:28 +00:00
Kubernetes Prow Robot
3ee195f0e9
Merge pull request #81431 from andrewsykim/ga-node-topology
Promote Node Zone/Region Topology Labels to GA
2019-11-07 22:00:20 -08:00
Kubernetes Prow Robot
496d69ee16
Merge pull request #84868 from oomichi/move-e2e-util-2
Move functions from e2e/framework/util.go Part-2
2019-11-07 19:20:19 -08:00
Andrew Sy Kim
349749644f test/e2e: check both beta and zone label for getting cluster zone
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-07 21:22:05 -05:00
Kubernetes Prow Robot
0bf790b99f
Merge pull request #84806 from damemi/waitforstablecluster
Update WaitForStableCluster to wait for only system pods to exist
2019-11-07 13:28:04 -08:00
Mike Dame
a19d83494f Update e2e framework WaitForStableCluster function
Move WaitForStable cluster to test/e2e/scheduling and update it to wait for only system pods to be ready in a stable cluster.
2019-11-07 11:32:46 -05:00
Justin SB
5031a2a049
e2e: Fix error where pods not logged
This was changed recently in #84640, but result must be pre-populated.

Example error:

`Nov  6 00:18:05.296: INFO: Unable to retrieve kubelet pods for node master-us-central1-c-t81q: expected pointer, but got nil`
2019-11-06 23:45:35 -05:00
SataQiu
f4ffca8e8b e2e: remove unused KubectlVersion function from framework/util 2019-11-07 11:18:58 +08:00
Kubernetes Prow Robot
7f441dc1c3
Merge pull request #84600 from jsafrane/e2e-log-initcontainers
Grab init containers logs in e2e tests
2019-11-06 15:34:03 -08:00
Kubernetes Prow Robot
d5fbc1126b
Merge pull request #84471 from oomichi/move-e2e-util
Move functions from e2e/framework/util.go
2019-11-05 22:17:59 -08:00
Kenichi Omichi
eb9d1cb5cc Move functions from e2e/framework/util.go Part-2
This PR moves functions from test/e2e/framework.util.go for making e2e
core framework small and simple:

- RestartKubeProxy: Moved to e2e network package
- CheckConnectivityToHost: Moved to e2e network package
- RemoveAvoidPodsOffNode: Move to e2e scheduling package
- AddOrUpdateAvoidPodOnNode: Move to e2e scheduling package
- UpdateDaemonSetWithRetries: Move to e2e apps package
- CheckForControllerManagerHealthy: Moved to e2e storage package
- ParseKVLines: Removed because of e9345ae5f0
- AddOrUpdateLabelOnNodeAndReturnOldValue: Removed because of ff7b07c43c
2019-11-06 03:59:28 +00:00
Kubernetes Prow Robot
0e53f3f455
Merge pull request #84499 from YuikoTakada/move-suites
Move funcs of suites.go to e2e.go
2019-11-05 15:31:03 -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
YuikoTakada
da89d212dd Move funcs of suites.go to e2e.go 2019-11-05 07:21:38 +00:00
Kubernetes Prow Robot
1b0caa496e
Merge pull request #84640 from clarklee92/UseFrameworkLogIn-e2e/framework/kubelet
Use log functions of core framework on test/e2e/framework/kubelet
2019-11-04 19:40:38 -08:00
Jordan Liggitt
300daa13a4 Set user agent for e2e consistently 2019-11-04 09:11:20 -05:00
clarklee92
dfa069a4bd Use log functions of core framework on test/e2e/framework/kubelet
1. move GetOneTimeResourceUsageOnNode() from test/e2e/framework/kubelet/stats.go to getOneTimeResourceUsageOnNode() in test/e2e/framework/resource_usage_gatherer.go
2. copy GetKubeletPods() from test/e2e/framework/kubelet/kubelet_pods.go to getKubeletPods() in test/e2e/framework/util.go
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-11-03 00:41:22 +08:00
Kubernetes Prow Robot
567c1bb4ec
Merge pull request #84513 from ingvagabund/retryAddOrUpdateAvoidPodOnNode
test/e2e: AddOrUpdateAvoidPodOnNode/RemoveAvoidPodsOffNode: retry when conflict hit during annotation update
2019-11-01 19:59:52 -07:00
Kenichi Omichi
ca4c349096 Move functions from e2e/framework/util.go
- SimpleGET: Moved to ingress sub package of e2e framework
- PollURL: Moved to ingress sub package of e2e framework
- ProxyMode: Moved to service e2e test package
- ListNamespaceEvents: Moved to e2e_node test package
- NewE2ETestNodePreparer: Removed since 59533f0cd1
2019-11-01 17:39:29 +00:00
alejandrox1
3da66c44e8 Cleaned up skip functions from e2e framework
This patch moves skip-related functions from framework/util.go to
another file.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-10-31 11:25:07 -04:00
Jan Safranek
17307c055c Grab init containers logs in e2e tests
Storage tests use initContainers + framework.TestContainerOutput and they
will benefit from logging their output in failed tests.
2019-10-31 14:58:51 +01:00
Jan Chaloupka
821220ecac test/e2e: AddOrUpdateAvoidPodOnNode/RemoveAvoidPodsOffNode: retry when conflict hit during annotation update
In case node object update fails due to revision conflict, it does not make sense to return success.
It needs to be retried so the v1.PreferAvoidPodsAnnotationKey annotation can be properly set in the next round.
2019-10-31 12:48:58 +01:00
Cheng Pan
b281d45749 Increase ClaimProvisionTimeout to 7 minutes 2019-10-23 05:40:06 +00:00
Kenichi Omichi
06d41a485c Move Initialized() to e2e framework util
The function is used at e2e framework util module only.
So this moves the function to the module for trying to remove
dependencies to subpackages from core e2e framework.
2019-10-11 22:29:03 +00:00
Dan Winship
779a842b3c Drop framework.GetReadySchedulableNodesOrDie
It is now fully replaced by e2enode.GetReadySchedulableNodes,
e2enode.GetBoundedReadySchedulableNodes, and
e2enode.GetRandomReadySchedulableNode.
2019-10-09 15:20:26 -04:00
alejandrox1
352254129b Refactored e2e-test-framework util.go
This cleans up the framework.util.go file and moves various Expect*
functions into their own file for better organization.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-10-05 15:02:46 -04:00
Patrick Ohly
4620d0b2b8 e2e log: move back to framework, part II
This continues the work in
https://github.com/kubernetes/kubernetes/pull/81426 by also moving the
logger_test.go, moving the log helper code from util.go to log.go (a
more logical place, as it is only used there) and updating comments.
2019-10-01 21:30:12 +02:00
Patrick Ohly
f70c81c9f2 e2e log: consistent logging of stack backtrace and failure, part II
After merging
259bb3bef5 (diff-eb7b79470992813ea1905e96c298b47b)
ExpectEqual and some of the other wrappers logged the failure twice,
once inside the wrapper itself and once in the failure handler.

Logging the stack backtrace is useful because many assertions still
don't contain an explanation and therefore knowing where they occur is
crucial. Now all failures are logged with a "Full Stack Trace", not
just those with a wrapper. The stack is pruned to skip over wrapper
functions and removes Ginkgo internal functions to keep the stack
trace smaller.

Failures occuring in the wrappers were recorded as occuring in those
wrappers. Now the wrappers are skipped and the caller is recorded
instead.

The full stack trace recorded by Ginkgo 1.10.0 is currently off by one
entry. This needs to be fixed in Ginkgo, then the test can be updated.
2019-10-01 21:27:29 +02:00
Kubernetes Prow Robot
2d491ace8d
Merge pull request #82439 from smarterclayton/async_ns_cleanup
test/e2e: Delete test namespaces asynchronously
2019-09-30 14:35:31 -07:00
Kubernetes Prow Robot
48199d3c0f
Merge pull request #83219 from alejandrox1/framework-util-skip
Cleaned up skip* functions from framework/util.go
2019-09-30 11:47:39 -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