Commit Graph

254 Commits

Author SHA1 Message Date
Jordan Liggitt
410ac59c0d Remove PodSecurityPolicy admission plugin 2022-05-04 16:00:56 -04:00
Sergiusz Urbaniak
f578b9a40d
test/e2e/framework: use restricted policy by default 2022-04-04 13:58:59 +02:00
Sergiusz Urbaniak
e06e6771ef
test/e2e/framework: add pod security admission configuration 2022-03-28 15:42:04 +02:00
ahrtr
fe95aa614c io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os 2022-02-03 05:32:12 +08:00
Clayton Coleman
1608fc5e88
e2e: Wait for kube-root-ca.crt to be created
The change from service account secrets to projected tokens and
the new dependency on kube-root-ca.crt to start pods with those
projected tokens means that e2e tests can start before
kube-root-ca.crt is created in a namespace. Wait for the default
service account AND the kube-root-ca.crt configmap in normal
e2e tests.
2022-01-25 14:23:31 -05:00
Patrick Ohly
5e9076da93 e2e: grab controller and scheduler metrics via port forwarding
The previous approach with grabbing via a nginx proxy had some
drawbacks:
- it did not work when the pods only listened on localhost (as
  configured by kubeadm) and the proxy got deployed on a different
  node
- starting the proxy raced with starting the pods, causing
  sporadic test failures because the proxy was not set up
  properly unless it saw all pods when starting the e2e.test
- the proxy was always started, whether it is needed or not
- the proxy was left running after a test and then the next
  test run triggered potentially confusing messages when
  it failed to create objects for the proxy

The new approach is similar to "kubectl port-forward" + "kubectl get
--raw". It uses the port forwarding feature to establish a TCP
connection via a custom dialer, then lets client-go handle TLS and
credentials.

Somehow verifying the server certificate did not work. As this
shouldn't be a big concern for E2E testing, certificate checking gets
disabled on the client side instead of investigating this further.
2021-06-16 12:02:40 +02: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
wojtekt
d4883f532e Remove KubeDescribe 2021-03-04 07:54:53 +01:00
llhuii
f713cbc4a4 Remove unused code in e2e/framework/framework.go 2021-03-03 10:03:21 +08:00
Fabio Bertinatto
3ec93da1b5 e2e: add custom timeouts to E2E framework 2020-12-02 15:57:58 -03:00
Marek Siarkowicz
7f59610f49 Add datapolicy tags to test/e2e/framework 2020-10-29 18:08:32 +01:00
Hemant Kumar
c4ce420667 Prevent deletion of namespace again 2020-09-09 11:22:08 -04:00
Kenichi Omichi
d191660c25 Use e2epod.WaitForPodTerminatedInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodTerminated() with the e2epod function.
2020-03-22 17:43:33 +00:00
tanjunchen
bed22fbb44 WaitForPodReady is simply wrapper functions for e2epod package,
and they made an invalid dependency to sub e2e framework from the core framework.

So we can use e2epod.WaitTimeoutForPodReadyInNamespace to remove invalid dependency.

The main purpose of this pr is to handle the framework core package dependency subpackage pod.
2020-03-22 23:08:52 +08:00
Kubernetes Prow Robot
d23310a40e
Merge pull request #89324 from tanjunchen/remove-invalid-dependency-waitForPod-002
use e2epod.WaitForPodRunningInNamespaceSlow directly
2020-03-22 00:36:44 -07:00
tanjunchen
aa52bfe4d6 use e2epod.WaitForPodRunningInNamespaceSlow directly 2020-03-21 15:51:49 +08:00
tanjunchen
d18e6569e0 use e2epod.WaitForPodNotFoundInNamespace directly 2020-03-21 15:11:40 +08:00
Kubernetes Prow Robot
d3b2199b2f
Merge pull request #89321 from oomichi/WaitForPodNoLongerRunning
Use e2epod.WaitForPodNoLongerRunningInNamespace directly
2020-03-20 20:00:53 -07:00
Kubernetes Prow Robot
a26f50a52e
Merge pull request #86679 from oomichi/remove-invalid-dependency-27
Use e2epod.WaitForPodNameRunningInNamespace directly
2020-03-20 15:58:44 -07:00
Kenichi Omichi
12ff8f2861 Use e2epod.WaitForPodNoLongerRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodNoLongerRunning() with the e2epod function.
2020-03-20 21:05:01 +00:00
drfish
f5450543e0 Remove framework.go's dependency on e2e node sub fw 2020-03-20 10:01:51 +08:00
Kenichi Omichi
2c8955fd4a Use e2epod.WaitForPodNameRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodRunning() with the e2epod function.
2020-03-17 00:13:14 +00:00
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