Commit Graph

733 Commits

Author SHA1 Message Date
Caleb Woodbine
b4fb46409d Update: test secret contains a default label, secrets are listed via default label, patch payload is marshaled instead of written in raw JSON, secret deleted check; Fix: comments, test namespace usage 2020-01-07 19:51:24 +00:00
Caleb Woodbine
ab12f460d9 Update: to use framework instead of gomega for testing values 2020-01-07 00:56:19 +00:00
Caleb Woodbine
c5e3ab1248 Fix: formatting, spelling 2020-01-06 21:47:08 +00:00
Caleb Woodbine
edd612d9f1 Add: test to patch a secret 2020-01-06 01:31:55 +00:00
Kenichi Omichi
253a85db16 Move WaitForFailure() to the test
WaitForFailure() is used at a single e2e test.
So this moves the function to the specific test file for the cleanup.
2019-12-30 23:16:24 +00:00
danielqsj
6596a14d39 add missing alias of api errors under test 2019-12-26 17:29:38 +08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
Kubernetes Prow Robot
4e35750abc
Merge pull request #86156 from tanjunchen/use-framework-Equal-test-e2e_node
test/e2e_node/:use framework.Equal() instead of using gomega.Expect(b…
2019-12-19 02:39:56 -08:00
Kubernetes Prow Robot
40750a02fa
Merge pull request #84425 from yutedz/e2e-pods-const
Declare constants in pods test as const
2019-12-17 06:18:00 -08:00
Kubernetes Prow Robot
9b840a72c9
Merge pull request #86148 from tanjunchen/use-framework-Equal
test/e2e/: use framework.Equal() replace gomega.Expect(...).To(gomega…
2019-12-17 04:19:59 -08:00
Kubernetes Prow Robot
80f03eb2ac
Merge pull request #85453 from claudiubelu/tests/enable-for-windows
tests: Removes [LinuxOnly] tag from a few tests
2019-12-16 21:37:51 -08:00
tanjunchen
f786cb07b7 test/e2e/: use framework.Equal() replace gomega.Expect(...).To(gomega.BeTrue()|BeFalse()) 2019-12-13 10:11:47 +08:00
tanjunchen
35b0f1f7dd test/e2e_node/:use framework.Equal() instead of using gomega.Expect(bool).To(gomega.BeTrue(),explain) 2019-12-11 18:50:29 +08:00
Kubernetes Prow Robot
3c4d2a5215
Merge pull request #78731 from claudiubelu/tests-hostnetwork
Sets HostNetwork to False for tests which do not require it
2019-12-09 15:22:39 -08:00
Jordan Liggitt
c62d6add9b Deflake pod readiness e2e 2019-12-03 09:15:04 -05:00
tanjunchen
52ac2783bc use framework refactor code in test/e2e/common 2019-11-28 18:03:01 +08:00
Aaron Crickenberger
3cbc07bb64 Promote a TCP probe test to Conformance 2019-11-21 12:12:58 -08:00
Claudiu Belu
e465e1089d Sets HostNetwork to False for tests which do not require it
Some tests are setting HostNetwork=true, even if it is not required
for them to pass.

This patch will set the HostNetwork to false for those tests, allowing
them to be run on Windows nodes as well.
2019-11-20 17:36:54 -08:00
Claudiu Belu
c80fe4d914 tests: Removes [LinuxOnly] tag from a few tests
We've added the WindowsRunAsUserName feature some time ago, and it was
promoted to Beta for v1.17. We can now remove the [LinuxOnly] tag for
a few tests.

Depends On: #83058
Depends On: #84882
2019-11-16 15:54:33 -08:00
SataQiu
50bc528a7e e2e: move LogFailedContainers out of e2e test framework util.go 2019-11-15 10:21:26 +08:00
Kubernetes Prow Robot
0386d769cc
Merge pull request #83058 from bclau/tests/windows-tests-support
tests: Fixes tests for Windows (containerd, RunAsUserName)
2019-11-14 16:37:13 -08:00
Kubernetes Prow Robot
55cef8048c
Merge pull request #84439 from danielqsj/f-apparmor
refactor apparmor utils in e2e
2019-11-14 13:30:08 -08:00
Kubernetes Prow Robot
77e110fcef
Merge pull request #84046 from bclau/tests/agnhost-guestbook-replacement
Tests/agnhost guestbook replacement
2019-11-14 08:29:34 -08:00
danielqsj
920dbddb46 refactor apparmor utils in e2e 2019-11-14 12:32:31 +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
Kubernetes Prow Robot
43ccfced1d
Merge pull request #84998 from wojtek-t/fix_owner_refs
Ensure that Node lease has OwnerReference set
2019-11-13 09:26:59 -08:00
Kubernetes Prow Robot
c85bde10c7
Merge pull request #84975 from mkumatag/fix-initcontainers
Remove resource constraints
2019-11-13 09:26:47 -08:00
danielqsj
ce34d0a49d refactor events utils in e2e 2019-11-13 16:03:17 +08:00
Manjunath A Kumatagi
de483097cb Remove memory resource constraint 2019-11-13 13:22:44 +05:30
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
Claudiu Belu
e8d062bd4a tests: Replaces guestbook with agnhost equivalent
The redis version has been bumped to version 5.0.5, but the maximum version supported on
Windows is 3.2. This can lead to failing tests, the output and behaviour can be different
(see #80516). In order to prevent such failures, the amount of times the Redis image is
used can be reduced.

This commit uses the previously added agnhost guestbook subcommand as a replacement for the
Guestbook application created by the test "should create and stop a working application".

Adds AgnhostPrivate to test/utils/image/manifest. Some tests are trying to pull
the agnhost image from the private registry, meaning that we would need to
always build and push the agnhost image to both e2e and private registry
whenever we bump its version. Decoupling them would mean that we only need
to push the image to the e2e registry.
2019-11-12 07:23:04 -08:00
Olev Kartau
4f75ed2a94 Removed 2nd arg "cs" from TestVolumeClient
as we assume it is always set to f.ClientSet and we can
use its value from passed framework argument.
2019-11-12 14:42:24 +02:00
Olev Kartau
2fac3f2c20 test/e2e: Reduce need to use local kubectl
Use POST method instead of running local kubectl.
Use ExecCommandInContainerWithFullOutput() instead of RunKubectl().
PodExec() takes additional framework arg, passed down in call chain.
VerifyExecInPodFail uses different error code cast as original
one causes test code Panic if used with new call method.
2019-11-12 14:42:24 +02:00
wojtekt
07200a0764 Ensure that Node lease has OwnerReference set 2019-11-12 09:11:59 +01:00
Kubernetes Prow Robot
66219e1638
Merge pull request #84510 from danielqsj/f-autoscaling
refactor autoscaling utils in e2e
2019-11-07 16:20:19 -08:00
Claudiu Belu
f0e6d8ed09 tests: Fixes tests for Windows (containerd, RunAsUserName)
Since we've added support for RunAsUserName, we can now run some new
tests. However, the [LinuxOnly] tag will have to remain until the
WindowsRunAsUserName feature becomes enabled by default.

Additionally, Containerd supports file mounting on Windows, and some
tests will be able to pass on Windows with Containerd instead of Docker.
2019-11-06 19:14:21 -08:00
danielqsj
b7b1055bf4 refactor autoscaling utils in e2e 2019-11-06 17:02:42 +08:00
Benjamin Elder
83c56a0373
remove hack/e2e.go 2019-11-03 19:36:59 -05:00
Kubernetes Prow Robot
dda78d59be
Merge pull request #84379 from oomichi/e2e-network
Separate e2enetwork from e2e core framework
2019-10-31 02:55:37 -07:00
Kubernetes Prow Robot
6196a5c7d1
Merge pull request #84495 from SataQiu/test-refactor-rcutil
test refactor: move test specific functions from rc_util.go
2019-10-30 21:56:03 -07:00
Kubernetes Prow Robot
e86878436f
Merge pull request #84410 from jfbai/move-funcs-of-expect-to-common
move funcs of expect.go to e2e/common
2019-10-29 19:54:52 -07:00
SataQiu
24f374a395 move test specific functions from rc_util.go 2019-10-29 13:04:59 +08:00
Ted Yu
e31c7cb193 Declare constants in pods test as const 2019-10-27 14:02:52 -07:00
Jianfei Bai
7401f2fe9b move funcs of expect.go to e2e/common 2019-10-27 11:54:32 +08:00
Kubernetes Prow Robot
2896fb0be8
Merge pull request #83711 from tanjunchen/fix-staticcheck-test/e2e/network
fix staticcheck failures in test/e2e/common directory
2019-10-26 02:23:22 -07:00
Kenichi Omichi
5d6faaddf6 Separate e2enetwork from e2e core framework
networking_utils.go is only for network tests and it is nice to
separate it from the core framework for easy maintenance.
2019-10-25 17:58:20 +00:00
Jordan Liggitt
8d0e4a4492 Revert "move hostPID tests to common"
This reverts commit 20ac24929b.
2019-10-22 21:28:44 -04:00
Kubernetes Prow Robot
9039e6b754
Merge pull request #83398 from bclau/tests/fix-windows-image-pulling
tests: Simplifies image pulling tests
2019-10-21 19:55:21 -07:00
Kubernetes Prow Robot
c981bce007
Merge pull request #83368 from Jefftree/move-hostpid-tests
Move hostPID tests to common
2019-10-21 17:09:22 -07:00
Kubernetes Prow Robot
b5c74a3f26
Merge pull request #82817 from zouyee/scpq
fix Security Context should run with an image specified user ID
2019-10-18 12:37:22 -07:00
tanjunchen
33dda68788 fix staticcheck in test/e2e/common directory 2019-10-12 11:30:47 +08:00
Timothy St. Clair
97055841b1 Audit of test/* OWNERS files 2019-10-10 15:52:51 -05:00
Kevin Taylor
cb8a7c1a4c Promote VolumeSubpathEnvExpansion feature gate to GA 2019-10-10 09:34:40 +01:00
Claudiu Belu
3c8822133a tests: Simplifies image pulling tests
Melds the "pull image from gcr.io" and "pull image from docker hub" tests
into a single test that pulls the agnhost image from the configured
e2eRegistry.

This also removes the need to maintain and update the image
"gcr.io/kubernetes-e2e-test-images/windows-nanoserver:v1". It should have been
a manifest list that also includes future Windows releases, like Windows Server 1903.
Additionally, the image has ~300 MB, meaning that with this change, it won't have to
wait as much to spawn a pod.

Removes "should not be able to pull non-existing image from gcr.io", since
the test "should not be able to pull image from invalid registry" test already
exists, and both of them test the same effect: cannot spawn a pod with an
image that does not exist.
2019-10-06 04:41:38 -07:00
Jefftree
40976754b5 Move privilege e2e test to common 2019-10-04 09:54:52 -07:00
Jefftree
20ac24929b move hostPID tests to common 2019-10-02 13:36:08 -07:00
Kubernetes Prow Robot
bc2971277d
Merge pull request #83148 from YuikoTakada/81427_e2e_common
use log functions of core framework
2019-09-30 20:17:31 -07:00
Kubernetes Prow Robot
c0ad143f64
Merge pull request #82632 from wojtek-t/node_lease_conformance
Promote lease API test to Conformance
2019-09-26 13:02:49 -07:00
YuikoTakada
9ed2f632cc use log functions of core framework 2019-09-26 02:45:07 +00:00
Kubernetes Prow Robot
df271a1799
Merge pull request #82291 from danwinship/getnodes
migrate from framework.GetReadySchedulableNodesOrDie to e2enode.GetReadySchedulableNodes
2019-09-25 11:04:43 -07:00
Kubernetes Prow Robot
c37c0b9dff
Merge pull request #82037 from ii/update-configmap-test
Update ConfigMap test
2019-09-25 11:04:01 -07:00
Dan Winship
ec4c1a1c05 Add e2enode.GetRandomReadySchedulableNode, replace some uses of framework.GetReadySchedulableNodesOrDie
For tests that want a single ready, schedulable node
2019-09-24 13:03:40 -04:00
zouyee
51653480c9 fix Security Context should run with an image specified user ID
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-09-24 20:26:34 +08:00
zouyee
4931a7eba8 uses the API instead to fixemptyDir volumes pod should support shared volumes between containers
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-09-18 13:58:44 +08:00
wojtekt
4ec66c842e Promote lease API test to Conformance 2019-09-12 19:58:04 +02:00
Ryan Phillips
6b18285cd2 kubelet e2e: defer the close to after the error check
fixes a potential crash
2019-09-04 10:01:52 -05:00
draveness
702646df24 test(runtimeclass): add e2e tests for runtimeclass scheduling 2019-09-01 16:41:48 +08:00
Kubernetes Prow Robot
7a7b8a7305
Merge pull request #82094 from tallclair/runtime-class-admission
Enable the RuntimeClass admission controller on GCE & CI
2019-08-30 08:00:12 -07:00
Matthias Bertschy
1a08ea5984 startupProbe: Test changes 2019-08-30 00:40:26 +02:00
Tim Allclair
2c01dc0ebf Update RuntimeClass E2E expectations 2019-08-29 10:56:48 -07:00
Caleb Woodbine
4041b538b8 Update ConfigMap test 2019-08-28 08:41:39 +12:00
alejandrox1
7c161d6a5f Refactoring pod related functions from pv_util to pod pkg
Moving pod related functions from e2e/framework/pv_util.go to
e2e/framework/pod in order to allow refactoring of pv_util.go into its
own package.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-08-27 12:27:45 -04:00
Kubernetes Prow Robot
8dc4b1b585
Merge pull request #80213 from bclau/tests/skips-windows-unrelated-tests
tests: Skips Windows-unrelated tests on Windows
2019-08-23 20:56:25 -07:00
Kubernetes Prow Robot
f14e88ad6e
Merge pull request #81414 from wojtek-t/lease_e2e_test
Add e2e test for Lease API
2019-08-22 15:09:59 -07:00
wojtekt
4be5ebd4dc Add e2e test for Lease API 2019-08-22 12:19:43 +02:00
Claudiu Belu
8812720148 tests: Skips Windows-unrelated tests on Windows
Skips IPv6 tests on Windows.
Skips sysctl tests on Windows.
Skips network policy tests on Windows.
Skips RunAsUser / FSGroup / file permissions related tests, as those are
not supported on Windows.
Skips the test "should preserve source pod IP for traffic thru service cluster IP"
on Windows, as it creates a Pod with HostNetwork=true, which is unsupported.

What works and what doesn't work on Windows has been documented here:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md#windows--linux-considerations
2019-08-20 14:19:14 -07:00
Masaki Kimura
04300826fd Rename WaitTimeoutForPodEvent to WaitTimeoutForEvent and move it to common/events.go 2019-08-19 16:11:30 +00:00
Kenichi Omichi
9e17433ccf Remove runDeployment() from e2e test
As https://github.com/kubernetes/kubernetes/pull/81231/files#r312670943
this removes runDeployment() by just moving some code into the test.
2019-08-10 00:10:09 +00:00
Kenichi Omichi
bf221a09b5 Remove core dependency from deployment e2e fw
RunDeployment() of the deployment e2e framework was used in
autoscaling_utils only. In addition, the deployment e2e framework
imported the core of e2e framework only for the function.
So this moves the function into autoscaling_utils then we can remove
dependency of core framework from the deployment e2e framework.
2019-08-09 19:31:14 +00:00
Kubernetes Prow Robot
072528e5f6
Merge pull request #80787 from ii/wip-configmap-contents-patch
Add validation to ConfigMap patch test
2019-08-08 10:04:11 -07:00
Caleb Woodbine
7218182f11 Update configMap data checking 2019-08-07 03:35:36 +00:00
Caleb Woodbine
b10743236e Update function for data inequality verification 2019-08-06 01:53:08 +00:00
Kubernetes Prow Robot
cce048123d
Merge pull request #80610 from aojea/ipv6kubectl
Add ipv6 support to the e2e kubectl tests
2019-08-05 13:36:02 -07:00
Caleb Woodbine
b845fee7f7 Add ConfigMap patch e2e test with validation step
Test originally written by draveness for this PR:
https://github.com/kubernetes/kubernetes/pull/78924

This commit adds a validation step to the test.
2019-08-01 13:00:59 -07:00
Kubernetes Prow Robot
e694959038
Merge pull request #80708 from WanLinghao/util_pods_refacotr
Move pod related functions in file test/e2e/framework/util.go to its sub directory
2019-07-31 20:08:38 -07:00
WanLinghao
e43572f02b Move pod related functions file in test/e2e/framework/util.go to its sub direcotry 2019-07-31 13:53:41 +08:00
Kubernetes Prow Robot
269183a7a8
Merge pull request #80666 from oomichi/cleanup-ResourceEventHandlerFuncs
Remove duplicated check in ObserveEventAfterAction
2019-07-30 10:09:43 -07:00
Kubernetes Prow Robot
e116b6f09d
Merge pull request #80615 from jeefy/e2e-test-fixes
Support passing `Args` for `newrc` function within `test/e2e`
2019-07-30 08:53:17 -07:00
Kubernetes Prow Robot
a23fc83fcd
Merge pull request #79751 from aojea/e2eDownwardAPI
Add e2e test for downward API with host network
2019-07-30 03:35:44 -07:00
Kubernetes Prow Robot
614aab80f5
Merge pull request #78740 from oomichi/extend-check
Make the check strict to use ExpectNoError()
2019-07-30 01:59:04 -07:00
Antonio Ojea
d20698a7a8
Debug values when test fail 2019-07-30 00:42:34 +02:00
Jeffrey Sica
ea2f6c80d7 support args for newrc funcs 2019-07-28 11:45:43 -04:00
Kenichi Omichi
18e3807cd7 Remove duplicated check in ObserveEventAfterAction
In ObserveEventAfterAction(), observedMatchingEvent is set if ok is
true. Now the ok is already checked with framework.ExpectEqual().
So this removes duplicated check for code cleanup.
2019-07-27 01:03:10 +00:00
Antonio Ojea
8988965df1
Add ipv6 support to the e2e kubectl tests 2019-07-26 00:40:46 +02:00
draveness
c38ae01f8e feat: move service_util to separated package 2019-07-19 08:32:39 +08:00
Kubernetes Prow Robot
9ac3fadbad
Merge pull request #80126 from aojea/redis
Use docker official redis images
2019-07-15 21:51:24 -07:00
Antonio Ojea
33e1b1d8a5
Use docker official redis images 2019-07-13 17:01:25 +02:00
Antonio Ojea
9c75f4a40a
Add e2e test for downward API with host network
Co-authored-by: BenTheElder <bentheelder@google.com>
2019-07-08 21:50:16 +02:00
draveness
0ec95afb76 feat: use framework.ExpectEqual instead of should 2019-07-07 21:07:48 +08:00
ClarkLee
867c88471f Use ExpectEqual in e2e/common 2019-07-04 13:50:19 +08:00
Kubernetes Prow Robot
d1d111496a
Merge pull request #79238 from bclau/tests/reduce-to-agnhost-part-3
tests: Replaces images used with agnhost (part 3)
2019-06-28 12:43:19 -07:00
wojtekt
e8ca50c43c Use coordination v1 API 2019-06-27 18:08:40 +02:00
Claudiu Belu
c752ea8134 tests: Replaces images used with agnhost (part 3)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- audit-proxy
- crd-conversion-webhook
- entrypoint-tester
- inclusterclient
- iperf
- porter
- serve-hostname
2019-06-26 13:33:55 -07:00
Kubernetes Prow Robot
dc8b928136
Merge pull request #79162 from SataQiu/fix-test-20190619
Refactor: replace framework.Failf with e2elog.Failf
2019-06-21 12:17:04 -07:00
Kubernetes Prow Robot
0c2830c560
Merge pull request #79084 from k-toyoda-pi/common_sysctlgo_remove_duplicate_comment
remove duplicate comment in e2e/common/sysctl.go
2019-06-21 12:16:39 -07:00
Kubernetes Prow Robot
ee0c2e31e8
Merge pull request #78780 from spiffxp/name-test-e2e-api-imports
rename test/e2e{,_node} api imports to groupversion
2019-06-20 17:14:35 -07:00
Kubernetes Prow Robot
c898ab2043
Merge pull request #78378 from k-toyoda-pi/golint_test_e2e_common_s-v
Fix golint failure in e2e/common/util.go
2019-06-20 12:58:35 -07:00
Aaron Crickenberger
b8d0ce4019 add import-alias for k8s.io/api/core/v1 2019-06-20 11:40:15 -07:00
Aaron Crickenberger
f3fd3cff8e add import-alias for k8s.io/api/coordination/v1beta1 2019-06-20 11:40:12 -07:00
Kubernetes Prow Robot
ef03129821
Merge pull request #78396 from bclau/tests/reduce-to-agnhost-part-2
tests: Replaces images used with agnhost (part 2)
2019-06-19 21:10:48 -07:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
Kenichi Omichi
d5bc1ae8aa Make the check strict to use ExpectNoError()
As https://github.com/kubernetes/kubernetes/pull/78478 we can use
ExpectNoError() instead of Expect(err).ToNot(HaveOccurred()) also.
This makes the test code check strict to cover the above case and
replaces the remaining in test/e2e/common/expansion.go
2019-06-18 16:55:16 +00:00
Jiatong Wang
b1c346c295 Move node related methods to framework/node package
- Add a package "node" under e2e/framework and alias e2enode;
- Rename some functions whose name have redundant string.

Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-06-17 16:59:07 -07:00
Claudiu Belu
9e81f3b50b tests: Replaces images used with agnhost (part 2)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- net
- netexec
- nettest
- webhook
2019-06-17 06:04:18 -07:00
toyoda
c4a96d3215 fix golint failure in e2e/common/util.go 2019-06-17 10:10:36 +09:00
toyoda
12cc719e62 remove duplicate comment in e2e/common/sysctl.go 2019-06-17 09:20:51 +09:00
Kubernetes Prow Robot
c5087f25c0
Merge pull request #78916 from mkimuram/rem-dot-import
Remove . import from e2e test
2019-06-15 16:34:08 -07:00
Kubernetes Prow Robot
411d6789e1
Merge pull request #78394 from bclau/tests/reduce-to-agnhost-part-1
tests: Replaces images used with agnhost (part 1)
2019-06-14 16:50:22 -07:00
Masaki Kimura
701395c392 Remove dot import from e2e test and replace with framework.ExpectNoError 2019-06-14 20:46:11 +00:00
Kubernetes Prow Robot
e2c5243d77
Merge pull request #77840 from mgdevstack/master-registry-utils
Add references of registry and image from imageutils
2019-06-14 00:28:47 -07:00
Kubernetes Prow Robot
b8ba75bcd9
Merge pull request #77526 from alejandrox1/framework_util_pod_refactor
Refactored pod-related functions from framework/util.go
2019-06-13 23:06:19 -07:00
Kubernetes Prow Robot
69d2e4304a
Merge pull request #75128 from bclau/tests/hostpath-privileged-false
tests: creates HostPath pods as unprivileged
2019-06-13 20:36:21 -07:00
Kubernetes Prow Robot
62eae8d058
Merge pull request #70639 from mgdevstack/promote-security-context
Promote security context NodeConformance tests to Conformance suite
2019-06-13 17:48:20 -07:00
Claudiu Belu
e3774b85b2 tests: Combine Linux / Windows image pulling tests
Because Linux images cannot run on Windows and vice-versa, separate
tests were added for both OSes, only separated by a [LinuxOnly] tag
in their names.

Based on the given --node-os-distro, we can select which image to
use when spawning the pod.
2019-06-13 15:57:59 -07:00
Claudiu Belu
bd8cb8fae0 tests: Replaces images used with agnhost (part 1)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- fakegitserver
- hostexec
- liveness
- logs-generator
- no-snat-test
- no-snat-test-proxy
- port-forward-tester
2019-06-13 15:05:50 -07:00
Mayank Gaikwad
3377737af2 Add references of registry and image from imageutils 2019-05-31 14:27:07 +05:30
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
Kubernetes Prow Robot
eb2b5d37ff
Merge pull request #78283 from s-ito-ts/77706_e2e_common
Use framework.ExpectError() for e2e/common
2019-05-29 17:24:58 -07:00
Kubernetes Prow Robot
51336deb4a
Merge pull request #78264 from tallclair/runasnonroot
Add RunAsNonRoot test
2019-05-29 03:10:50 -07:00
s-ito-ts
3492c81e12 Use framework.ExpectError() for e2e/common 2019-05-29 05:46:16 +00:00
toyoda
028cd65db9 fix golint failure in e2e/common/[p-r]* 2019-05-27 08:57:02 +09:00
Kubernetes Prow Robot
16d33c4985
Merge pull request #78042 from oomichi/use-ExpectNoError-common2
Use framework.ExpectNoError() on e2e/common
2019-05-25 13:03:50 -07:00
Tim Allclair
19a588eeda Add a special-cased runtime handler for dockershim 2019-05-24 15:30:34 -07:00
Tim Allclair
c851c480d3 Move to debian-base non-root image 2019-05-24 11:57:43 -07:00
Tim Allclair
6e78c5bdde Add RunAsNonRoot test 2019-05-23 12:23:04 -07:00
Kenichi Omichi
b17384acbe Use framework.ExpectNoError() on e2e/common 2019-05-17 17:30:38 +00:00
Kubernetes Prow Robot
6fff760175
Merge pull request #70658 from spiffxp/tcp-probe
cleanup container probe tests and add tcp probe case
2019-05-16 06:05:43 -07:00
Aaron Crickenberger
0541be1787 Add a tcp probe e2e test 2019-05-15 15:23:35 -07:00
Aaron Crickenberger
944976d11f Extract pod specs and handlers into fixtures 2019-05-15 15:22:58 -07:00
Kenichi Omichi
b9fffd1571 Use framework.ExpectNoError() for e2e/common
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it.
2019-05-15 01:58:01 +00:00
draveness
950f6e868c refactor: use framework.ExpectNoError instead 2019-05-12 10:44:03 +08:00
Kubernetes Prow Robot
a245408f38
Merge pull request #76734 from oomichi/conformance-req-01
Check conformance test should not call any Skip
2019-05-10 19:28:11 -07:00
John Schnake
afc66a5487 Move scalability, upgrade, and common packages to framework/log
This is part of the transition to using framework/log instead
of the Logf inside the framework package. This will help with
import size/cycles when importing the framework or subpackages.
2019-05-04 12:45:15 -05:00
Kubernetes Prow Robot
22cf3ca0a5
Merge pull request #75952 from bclau/tests/max-backoff-tests-flakiness
tests: Solve backoff tests flakiness
2019-05-03 22:18:04 -07:00
Kubernetes Prow Robot
f4ce6b6560
Merge pull request #77373 from alejandrox1/framework-deployment-refactor
Refactored framework deployment utils
2019-05-03 19:49:37 -07:00
Kubernetes Prow Robot
7287ae6b2e
Merge pull request #77054 from k-toyoda-pi/golint_test_e2e_common_pods
Fix golint failures of test/e2e/common/pods.go
2019-05-03 18:26:03 -07:00
Jorge Alarcon Ochoa
dc619067d9 Refeactored framework deployment utils
This is the continuation of the refactoring of framework/deployment_utils.go
into framework/deployment.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-05-03 18:00:53 -04:00
Kenichi Omichi
52885a8ec3 Check conformance test should not call any Skip
Basically conformance test checks the target k8s cluster works all
features which are specified in each test and that should not depend
on any condition.
This adds checking that conformance test should not call any Skip
methods. And it detects the existing conformance test
"creating/deleting custom resource definition objects works"
calls framework.SkipUnlessServerVersionGTE(). So this removes the
Skip also.
2019-05-03 18:37:31 +00:00
Kubernetes Prow Robot
ed2ab71710
Merge pull request #75237 from aojea/ipv6_downward
Add IPv6 support to the Downward e2e API test
2019-04-25 13:36:42 -07:00
toyoda
bee9676d50 fix golint failure test/e2e/common/pods.go 2019-04-25 16:39:21 +09:00
Antonio Ojea
d528944a03
Add more strict IPv6 regex
Previous IPv6 regex was too loose, this patchs adds a better and
more strict regex for IPv6 addresses and makes the IPv4 and IPv6
regex availables as constants inside the framework pkg
2019-04-24 23:37:24 +02:00
Kubernetes Prow Robot
f3ec8f0d99
Merge pull request #76546 from HotelsDotCom/kep/VolumeSubpathEnvExpansion-Beta
Beta upgrade for feature gate VolumeSubpathEnvExpansion
2019-04-19 01:05:56 -07:00
Kubernetes Prow Robot
5f1a3a98d4
Merge pull request #75245 from aojea/e2e_ipv6_lifecyclehook
Add IPv6 support to the Container Lifecycle tests
2019-04-18 21:59:54 -07:00
Kubernetes Prow Robot
462d909f6d
Merge pull request #75244 from aojea/e2e_ipv6_health
Add ipv6 support to the e2e healthz test
2019-04-17 13:40:04 -07:00
Kevin Taylor
bb5b4ad0b2 Beta upgrade for feature date VolumeSubpathEnvExpansion 2019-04-17 07:41:00 +01:00
Mayank Gaikwad
82822f10e1 Promote container runtime e2e verifying termination message 2019-04-15 16:37:18 +05:30
Kubernetes Prow Robot
1b9206a17c
Merge pull request #76414 from SataQiu/refactor-e2e-volume-20190411
[e2e] test/e2e/framework/volume_util.go -> test/e2e/framework/volume/fixtures.go
2019-04-13 00:42:03 -07:00
SataQiu
252cabf155 [e2e] test/e2e/framework/volume_util.go -> test/e2e/framework/volume/fixtures.go 2019-04-13 16:58:37 +08:00
Kubernetes Prow Robot
df6ca6ab9f
Merge pull request #76156 from chardch/recreate-master-retry
Recreate nodes e2e test
2019-04-12 23:26:02 -07:00
Kubernetes Prow Robot
9aac5ced1f
Merge pull request #74702 from globervinodhn/secret_empty_promote
Promote empty secret key e2e test to conformance test
2019-04-12 21:38:02 -07:00
Jiaying Zhang
8175579a0c add recreate node e2e test
Move recreate_node test to gce provider tests.
2019-04-12 16:00:19 -07:00
Kubernetes Prow Robot
2d5f5a9da5
Merge pull request #75471 from pontiyaraja/sharedVolCNF
promote shared volumes between the container in a pod e2e to conformance
2019-04-12 15:56:04 -07:00
Kubernetes Prow Robot
cf76367f05
Merge pull request #75101 from mgdevstack/promote-runtime-2
Promote container runtime e2e having non default TerminationMessagePath set
2019-04-12 14:30:36 -07:00
Mayank Gaikwad
f7d8771dfe Promote security context NodeConformance tests to Conformance suite 2019-04-12 10:22:24 +05:30
draveness
dee97a4e5c refactor: cleanup e2e replicaset utils 2019-04-12 01:48:10 +08:00
Claudiu Belu
4d22a51414 tests: creates HostPath pods as unprivileged
The containers are mounted the /tmp folder as a HostPath volume
and they are supposed to create a new file in it.

The /tmp folder has 777 file permissions, so there shouldn't be any
problems creating a file, even if the container is unprivileged.
2019-04-11 04:31:05 -07:00
Mayank Gaikwad
295f43b1fa Promote container runtime e2e verifying non-default termination message path 2019-04-04 07:09:17 +05:30
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
Kubernetes Prow Robot
c8d6d7c0d0
Merge pull request #74757 from tallclair/runtimehandler-e2e
Add custom runtime handler e2e test
2019-04-01 13:18:47 -07:00
Kubernetes Prow Robot
b179862d96
Merge pull request #75613 from tallclair/owners
Copy node test owners to e2e/common
2019-03-29 23:53:08 -07:00
Kenichi Omichi
78a93f8ced Fix golint failures of e2e/framework/n*.go 2019-03-29 02:17:43 +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
Claudiu Belu
e44961e47d tests: Solve backoff tests flakiness
The container status is not constant, and can change over time in the
following order:

- Running: When kubelet reports the Pod as running. This state is missable if
  the container finishes its command faster than kubelet getting to report this
  state.
- Terminated: After the Container finished its command, it will enter the Terminated
  state, in which will remain for a short period of time, before kubelet will try
  to restart it.
- Waiting: When kubelet has to wait for the backoff period to expire before actually
  restarting the container.

Treating and handling each of these states when calculating the backoff period between
container restarts will make the tests more reliable.
2019-03-28 02:08:40 -07:00
globervinodhn
a5f3e24ab7 promote empty secret key test to conformance: Version updated to v1.15 2019-03-23 16:07:50 +05:30
Tim Allclair
59bfb1cb9a Copy node test owners to e2e/common 2019-03-22 12:02:05 -07:00
Kubernetes Prow Robot
775d298cb0
Merge pull request #75347 from kanwar-saad/secret_negative_test_fix
test/e2e: Fix double error in secret negative testcase
2019-03-21 17:32:30 -07:00
pontiyaraja
584e00aa20 promote shared volumes between the container in a pod e2e to conformance 2019-03-19 14:39:40 +05:30
Kubernetes Prow Robot
3512757882
Merge pull request #75416 from tallclair/local-redirects
Don't follow non-local redirects from HTTP probes
2019-03-16 09:14:57 -07:00
Tim Allclair
691a301368 e2e test for http probe redirects 2019-03-15 11:52:25 -07:00
Jordan Liggitt
8f9ed58d20 Deflake node lease test 2019-03-14 09:38:40 -07:00
kanwar saad bin liaqat
2f852a27cb Fix double error of secret negative testcase
E2E Test "Secret should fail to create secret in volume
due to empty secret key" tries to create a secret
with empty key and check whether it fails or not.
But the secret creation in this test fails with
double error due to invalid secret name. This will
make this test to pass even if the fuctionality
which needs to be tested is broken.

This commit fix the secret name error(name should not
have capital letters) so that the secret creation fails
only due to desired reason.

Signed-off-by: kanwar saad bin liaqat <kanwar.sbl@gmail.com>
2019-03-13 22:23:02 +02:00
Tim Allclair
d15718cb1c Add custom runtime handler e2e test 2019-03-12 14:47:56 -07:00
Kubernetes Prow Robot
c094f873a9
Merge pull request #75206 from liggitt/node-lease
deflake nodelease test
2019-03-11 20:24:36 -07:00
Antonio Ojea
527d2aa2bd
Add IPv6 support to the Container Lifecycle tests
Current e2e tests for the Container Lifecycle Hooks weren't
using brackets for the IPv6 URL addresses per RFC2732, thus those
tests were failing.

This patches add brackets to the target URL if it's an IPv6 address.

Reference: https://github.com/kubernetes/kubernetes/issues/70248
2019-03-10 17:24:09 +01:00
Antonio Ojea
d5d57baa36
Add ipv6 support to the e2e healthz test
The test [k8s.io] Probing container [It] should not be restarted with a
/healthz http liveness probe [NodeConformance] [Conformance]
fails because it's using a nginx image that's spawns a server that's
only listening on IPv4 by default.

Switching to an image like TestWebserver that's listening in IPv4 and IPv6 by default
allows the test to run on IPv4 and IPv6 environments.

Reference: https://github.com/kubernetes/kubernetes/issues/70248
2019-03-10 16:53:06 +01:00
aojeagarcia
ae4ccc91b2
Add IPv6 support to the Downward e2e API test
Current regex used in the Downward e2e API tests is matching only
IPv4 addresses, consequently those tests fails with IPv6 clusters.

This patch modifies the regex to match ipv4 and ipv6 addresses.

Ref: https://github.com/kubernetes/kubernetes/issues/70248
2019-03-09 20:10:31 +01:00
Jordan Liggitt
5b0099785e deflake nodelease test 2019-03-08 16:31:05 -05:00
Hemant Kumar
93c2a1af3f Fix emptydir e2e flake
Wait forver and reduce grace period deletion
2019-03-07 14:35:39 -05:00
Kubernetes Prow Robot
ab7a48d796
Merge pull request #70036 from pbarker/audit-etoe
dynamic audit e2e test
2019-03-06 17:58:58 -08:00
Kubernetes Prow Robot
e1c5e8394e
Merge pull request #71950 from bclau/fix-max-backoff-test-flake
tests: getRestartDelay waits for the next Terminated state
2019-03-06 03:26:04 -08:00
Kubernetes Prow Robot
7304c50ef5
Merge pull request #74655 from bclau/tests/windows-gcrio
tests: Adds gcr.io Windows image test case
2019-03-06 00:44:06 -08:00
Patrick Barker
45d715cdc6 adds dynamic audit e2e test 2019-03-05 14:38:58 -07:00
Claudiu Belu
d5f2ec4b6a tests: Adds TODO for Windows only test
It has been suggested to replace the "e2eteam/busybox:1.29" image
used in the test "should be able to pull image from docker hub [NodeConformance]"
with a nanoserver image manifest list.

Adds a TODO for it.
2019-03-03 21:11:24 -08:00
Claudiu Belu
5edc073122 tests: getRestartDelay waits for the next Terminated state
Kubelet might miss reporting the new Running state when restarting
a pod after its backoff period expired, and thus, the pod will
continue to remain in CrashLoopBackOff state, causing the
"should cap back-off at MaxContainerBackOff" and
"should have their auto-restart back-off timer reset on image update"
tests to fail, since they're waiting the Pods to enter a Running state.

Waiting for the next Terminated state instead of the next Running state
is more reliable.

Note that this adds 5 seconds to the restart delay due to the fact that
the Container runs for 5 seconds (it's command is "sleep 5"), but it is
within the test's expectations.
2019-03-03 08:35:51 -08:00
Kubernetes Prow Robot
6b2882738b
Merge pull request #74805 from HotelsDotCom/feature/remove-kubectl-binary
VolumeSubpathEnvExpansion alpha tests - change kubectl references to API calls
2019-03-02 03:41:15 -08:00
Kubernetes Prow Robot
646145f578
Merge pull request #74125 from tuanvcw/fixing_typo
Fix many typos in both code and comments
2019-03-01 14:08:45 -08:00
Kevin Taylor
8828ccfa6b Change kubectl references to API calls 2019-03-01 11:33:03 +00:00
Kubernetes Prow Robot
d761fe8491
Merge pull request #72774 from globervinodhn/conformance-emptyconfigmapkey-addition
Promote emptyconfigmap key e2e test to conformance test
2019-02-28 20:36:07 -08:00
Kubernetes Prow Robot
5d0e293b85
Merge pull request #70492 from mgdevstack/master-runtime-tabletest
Transition "e2e/common/runtime.go" table based tests to individual tests
2019-02-27 12:31:01 -08:00
Claudiu Belu
81ee747395 tests: Adds private gcr.io Windows image test case
Adds the test "should be able to pull from private registry with secret [NodeConformance]"
which will pull the image "gcr.io/authenticated-image-pulling/windows-nanoserver:v1".
The mentioned image is a manifest list, and it works for both
Windows Server 1803 and Windows Server 2019. The manifest list
will have to be amended when a new Windows Server is released.
2019-02-27 11:23:08 -08:00