Commit Graph

177 Commits

Author SHA1 Message Date
Rob Scott
1ae53a15e6
Limiting the scope of new kubectl get e2e tests to decrease flakiness
The `kubectl get output` e2e test I'd previously added ended up being
flaky in certain e2e test scenarios. It relies on getting a list of API
resources in the cluster and running `kubectl get` calls against them.
The problem ended up being that other e2e tests could create resources
that would cause this test to fail. This change limits the scope of the
tests to not cover CRDs. This should still allow the test to catch new
Kubernetes resources with improperly configured kubectl output while
limiting the flakiness of the test.
2019-11-07 11:58:30 -08:00
Rob Scott
8ae5632859
Adding e2e test to ensure kubectl get output is using custom columns when desired.
This uses etcd test data to load resources and then ensures that
kubectl get output contains a different set of columns than default.
This assumes that all future API resources will either have appropriate
kubectl get output or add an exception here.

Co-authored-by: Luis Sanchez <sanchezl@redhat.com>
2019-11-01 14:08:08 -07:00
SataQiu
24f374a395 move test specific functions from rc_util.go 2019-10-29 13:04:59 +08:00
Kubernetes Prow Robot
cae9bbd059
Merge pull request #81358 from bclau/tests/replace-redis-image
tests: Replaces Redis image with Agnhost
2019-10-16 22:24:51 -07:00
Kubernetes Prow Robot
b622b15ad4
Merge pull request #79814 from k-toyoda-pi/e2e_add_kubectl_describe_cronjob
Add e2e test for kubectl describe cronjob
2019-09-26 13:02:34 -07:00
carlory
5bbedd39c0 use log funcs of core framework in the auth, kubectl and windows pkg 2019-09-15 21:39:54 +08:00
Kubernetes Prow Robot
51e9ff8579
Merge pull request #82224 from liggitt/debug-kubectl-e2e-log
Add debug info to kubectl e2e
2019-09-11 10:41:04 -07:00
Claudiu Belu
b91aa9a5c3 tests: Replaces Redis image with Agnhost
Some tests are using the Redis image, but they do not explicitly need it.
This commit replaces the usage of the Redis image with the Agnhost image
in such test cases.
2019-09-09 00:25:18 -07:00
Kubernetes Prow Robot
1866891f71
Merge pull request #79235 from justinsb/fix_73099
kubectl attach test: wait for input before proceeding
2019-09-06 04:36:57 -07:00
toyoda
60d8bf4464 Add e2e test for kubectl describe cronjob 2019-09-05 17:08:09 +09:00
Jordan Liggitt
6b961eb08c Add debug info to kubectl e2e 2019-09-01 21:55:09 -04:00
Maciej Szulik
6939e77277
Remove kubectl log 2019-08-29 16:10:48 +02:00
Kubernetes Prow Robot
8bf4bdc7f3
Merge pull request #79910 from k-toyoda-pi/replace_KubeDescribe_e2e_kubectl
Replace KubeDescribe with ginkgo.Describe in e2e/kubectl
2019-08-22 23:27:16 -07:00
Kubernetes Prow Robot
dd0fb73a61
Merge pull request #81393 from oomichi/cleanup-ReadOrDie
Remove fail argument from ReadOrDie()
2019-08-21 10:36:31 -07:00
Joe Betz
1d429a615c Update e2e tests to use CRD v1 API 2019-08-19 18:31:14 -07:00
Kenichi Omichi
cd24b24725 Remove fail argument from ReadOrDie()
Every caller of ReadOrDie() specified ginkgo.Fail as fail argument,
and that was intentional to avoid depending on Ginkgo.
However that just spreaded the dependency on Ginkgo to caller sides.
Especially that was unnecessary e2e test framework "ingress" depended
on Ginkgo only for the above reason.
Now we are cleaning up the dependencies on e2e tests, so let's just
remove such dependencies.
2019-08-14 00:35:51 +00:00
Ted Yu
010d838264 Hide bearer token in logs 2019-08-13 09:36:15 -07:00
Kubernetes Prow Robot
da4248602d
Merge pull request #80516 from adelina-t/refactor_kubectl_test
Refactor kubectl retrieve logs test to use agnhost
2019-08-05 19:57:53 -07: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
Adelina Tuvenie
f8a38220e3 Refactor kubectl retrieve logs test to use agnhost
Windows is having trouble running this test because the Redis
port for Windows is older than the one used by the test, as
described in the issue #80265.

Changing the "Kubectl should retrieve and filter logs" test
to use the agnhost image to generate the logs.

Fixes: https://github.com/kubernetes/kubernetes/issues/80265
2019-07-30 21:57:43 +03:00
Sean Sullivan
9f3384f02f Move pkg/kubectl/polymorphichelpers staging 2019-07-30 10:10:30 -07:00
Antonio Ojea
8988965df1
Add ipv6 support to the e2e kubectl tests 2019-07-26 00:40:46 +02:00
Kubernetes Prow Robot
0ba6ecca72
Merge pull request #77155 from draveness/feature/refactor-util-service
refactor: move service related functions in service pkg
2019-07-23 15:52:15 -07:00
Clayton Coleman
86426b9f60
Pod e2e for reading last line can flake if pod runs to completion
Pod completes so fast the current check fails:

```
Jul 18 07:09:24.858: INFO: Running '/usr/bin/kubectl --server=https://api.ci-op-ziq360tf-12fbf.origin-ci-int-aws.dev.rhcloud.com:6443 --kubeconfig=/tmp/admin.kubeconfig run run-log-test --generator=run-pod/v1 --image=docker.io/library/busybox:1.29 --restart=OnFailure --namespace=e2e-tests-kubectl-nxzxx -- sh -c sleep 10; seq 100 | while read i; do echo $i; sleep 0.01; done; echo EOF'
...
Jul 18 07:09:25.116: INFO: Waiting up to 5m0s for pod "run-log-test" in namespace "e2e-tests-kubectl-nxzxx" to be "running and ready"
Jul 18 07:09:25.135: INFO: Pod "run-log-test": Phase="Pending", Reason="", readiness=false. Elapsed: 19.221661ms
...
Jul 18 07:09:57.456: INFO: Pod "run-log-test": Phase="Pending", Reason="", readiness=false. Elapsed: 32.339426605s
Jul 18 07:09:59.477: INFO: Pod "run-log-test": Phase="Succeeded", Reason="", readiness=false. Elapsed: 34.360446811s
...
Jul 18 07:14:24.023: INFO: Pod "run-log-test": Phase="Succeeded", Reason="", readiness=false. Elapsed: 4m58.906706065s
Jul 18 07:14:26.023: INFO: Pod run-log-test failed to be running and ready.
```

The test should be reporting running and ready or succeeded.
2019-07-20 22:09:27 -04: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
048f7a212b
Adjust redis matching strings 2019-07-13 18:37:43 +02:00
toyoda
baddd2fd3b Replace KubeDescribe with ginkgo.Describe in e2e/kubectl 2019-07-08 18:03:40 +09:00
toyoda
5a5886035b Use ExpectEqual in e2e/kubectl 2019-07-03 13:55:19 +09:00
Jordan Liggitt
6ca80760fd Switch test manifests to apps/v1, remove beta workloads calls 2019-06-22 13:58:07 -07:00
Justin SB
0c57ad0004
kubectl attach test: wait for input before proceeding
This way we know stdin is attached and we are in a known state.
2019-06-22 15:45:58 -04:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
Kubernetes Prow Robot
7abf2832bf
Merge pull request #78614 from liggitt/remove-beta-e2e-use
Move test/e2e use to v1 APIs
2019-06-14 07:58:38 -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
Jordan Liggitt
044e92b5cf Fix kubectl apply skew test with extra properties 2019-06-06 14:55:52 -04:00
Jordan Liggitt
8229af31d2 Move test/e2e use to v1 APIs 2019-06-03 14:46:08 -04: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
Jiatong Wang
76f76450ca Move service_util endpoints related to framework/endpoints
Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-05-20 11:47:38 -07:00
Kubernetes Prow Robot
583fcb91ca
Merge pull request #77976 from soltysh/validate_true
Don't rely on defaults enforce flags we rely on in tests
2019-05-17 07:00:51 -07:00
Maciej Szulik
e808bf9717
Don't rely on defaults enforce flags we rely on in tests 2019-05-16 15:23:55 +02:00
Dr. Stefan Schimanski
a90cab07f9 e2e: cleanup test/util/crd to decouple tests 2019-05-15 22:24:21 +02:00
Kubernetes Prow Robot
389252feae
Merge pull request #77709 from danielqsj/test
replace test error checking with more readable way
2019-05-13 13:15:23 -07: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
danielqsj
f3ea5e5c94 replace test error checking with more readable way 2019-05-10 10:15:45 +08:00
Jiatong Wang
3b5bedd7cf Modify e2e/kubectl tests to import e2elog.Log
Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-05-06 00:23:59 -07: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
8f5a62af48
Merge pull request #77159 from draveness/feature/refactor-expect-no-errors
refactor: use framework.ExpectNoError instead in e2e tests
2019-05-01 08:22:57 -07:00
draveness
04bb797ff6 refactor: use framework.ExpectNoError instead in e2e tests 2019-04-27 15:49:15 +08:00
Ahmad Nurus S
0c39d7d380 Kubectl exec support resource/name format 2019-04-25 17:44:01 +07:00
John Schnake
028df0451d Refactor of e2e/framework/authorizer_util.go
- moves these helper functions into e2e/framework/auth
 - removes logging from helper functions
 - in some cases explicitly returns errors that were implicitly
ignored/logged. In the situations where they should be ignored,
we explicitly check that the condition is met before ignoring it.
 - fixes references of these methods to use the right package and
return values
2019-04-17 16:39:37 -05:00
draveness
f32352ac7e refactor: clean up e2e framework job utils
1. Move job_util to e2e/framework/job package
2. Remove unused UpdateJobWithFunc
2019-04-12 21:26:33 +08:00
Giuseppe Scrivano
31397083b2
test, e2e: add tests for logs -f
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-31 12:15:36 +02:00
Patrick Ohly
25c615c157 test: fix golint warnings in crd_util.go
Because the code was moved, golint is now active. Because users of the
code must adapt to the new location of the code, it makes sense to
also change the API at the same time to address the style comments
from golint ("struct field ApiGroup should be APIGroup", same for
ApiExtensionClient).
2019-03-13 23:00:49 +01: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
Haowei Cai
591f00e9b3 test client-side validation behavior for CRD
support version-skew testing
2019-03-05 12:22:46 -08:00
danielqsj
8911a2ddbb fix golint failures for test/e2e/kubectl 2019-02-26 18:27:01 +08:00
toyoda
bdd17d4ca6 add test for getting componentstatuses 2019-02-26 11:25:14 +09:00
Chris Sosa
06fe60af5b Remove race condition with run-test
This change modifies kubectl run e2e test to remove a race condition
where kubectl run might complete before we can scrape the logs off via
attach.

Tested via running the e2e tests a few times on gce via kubetest.
2019-02-04 11:47:20 -08:00
Kubernetes Prow Robot
f66805ef5e
Merge pull request #63600 from bclau/remove-hardcoded-yaml-images
tests: Removed hardcoded images from yaml files
2019-01-30 11:53:37 -08:00
Claudiu Belu
fd4f55375b tests: Removed hardcoded images from yaml files
Some tests use .yaml files to deploy pods, which have hardcoded
images. Those images cannot be used for Windows containers.

The image names can be injected by the tests themselves, based on
the configured registries.
2019-01-15 20:22:19 -08:00
Weibin Lin
842bd1e1ec update deployment, daemonset, replicaset, statefulset to apps/v1 2018-12-19 10:46:45 -05:00
toyoda
b5fe04dae5 fix typos in test/e2e/kubectl/kubectl.go 2018-11-14 10:39:02 +09:00
Davanum Srinivas
43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
k8s-ci-robot
cfd6343477
Merge pull request #66515 from justinsb/verify_kubectl_dump
Add test for kubectl cluster-info dump
2018-10-18 18:38:52 -07:00
juanvallejo
e55a28d169
fix paths w shortcuts when copying from pods
Addresses an issue where copying from a remote location containing path
shortcuts (podName:../../../tmp/foo) causes an index out of range panic.
2018-10-09 10:27:54 -04:00
Justin Santa Barbara
b56d577e4d Add test for kubectl cluster-info dump
kubectl cluster-info dump is currently giving a schema error; adding a
test for it.
2018-10-08 18:52:52 -04:00
Patrick Ohly
212af1ac29 e2e: abstract access to additional files
The new test/e2e/framework/testfiles package makes it possible to
write tests that do not depend on a specific way of providing
additional test files at runtime. Such tests and the framework are
then more easily reused in other test suites.

In the test/e2e suite file access is enabled based on the existing
"repo-root" command line parameter and the built-in bindata. Tests
using the new API will first check for files under "repo-root" and
then fall back to the builtin data. This way, users of a test binary
can modify those files without having to rebuild the binary.

"repo-root" is still needed because at least some tests check for
additional files (secret.yaml, via ingress_utils.go) that are not part
of the upstream source code and thus may or may not be built into a
test binary.

Tests using bindata or repo-root directly get modified to use the new
API, or removed when they are obsolete: test/e2e/examples.go depended
on files that were removed in
https://github.com/kubernetes/kubernetes/pull/61246 and thus can no
longer be run in Kubernetes. Moving the tests to kubernetes/examples
is tracked in https://github.com/kubernetes/examples/issues/214.

The file removal did not break the automated E2E testing probably
because the tests are under the Feature:Example tag and thus not
enabled during normal CI runs.

Removing also the obsolete tests makes it simpler to rework the
"repo-root" setting because less code uses it.

Related-to: #66649 and #23987
2018-10-02 08:31:03 +02:00
k8s-ci-robot
de2b43f14d
Merge pull request #64080 from karataliu/klv
Update verbose level for kubectl test
2018-10-01 18:03:45 -07:00
SataQiu
94a653f100 fix typo 2018-09-28 23:41:24 +08:00
k8s-ci-robot
435bd61145
Merge pull request #68354 from wgliang/fixbug/trim
fix wrong usage of strings.TrimLeft
2018-09-25 11:04:02 -07:00
Guoliang Wang
bcc1dd8627 fix wrong usage of strings.TrimLeft 2018-09-06 19:39:04 +08:00
Akihito INOH
f965d55eae Fix failure message of e2e test about kubectl
At e2e test for "apply set/view last-applied",
failure message is `Missing "replicas": 2 in kubectl
view-last-applied`, in spite of `replicas` key is contained.
This changes `Missing` to `Presenting`.
2018-09-06 09:28:13 +09:00
hangaoshuai
ab8c5d4209 some minor fix in test/e2e/kubectl/kubectl.go 2018-08-15 09:06:21 +08:00
hangaoshuai
5f4ed04835 remove some unused functions 2018-08-14 11:42:27 +08:00
Davanum Srinivas
6cd8bd62fe
e2e test harness - use busybox from dockerhub
Use the same pattern everywhere in the e2e test
harness, use busybox (from dockerhub) instead
of using the one from k8s.gcr.io registry.

Change-Id: I57c3b867408c1f9478a8909c26744ea0368ff003
2018-08-07 11:22:16 -04:00
Manjunath A Kumatagi
1f7f33aaa4 Update the nginx image from hub.docker.com 2018-08-04 05:19:53 +05:30
juanvallejo
9120557466
update attach to use external objs 2018-08-01 10:44:43 -04:00
Justin Santa Barbara
bbaf337059 e2e: don't require heapster
As heapster is now deprecated, we shouldn't require it for e2e tests to pass.
2018-07-23 15:51:05 -04:00
Jordan Liggitt
6b2278fe21
Add debugging for scale e2e test errors 2018-06-26 13:34:48 -04:00
ruicao
95c232ee07 Typo fix: toto -> to 2018-06-12 23:12:39 +08:00
Maciej Szulik
a82d11bbba
Increase the timeout when waiting for the job to be gone 2018-05-28 15:53:14 +02:00
Maciej Szulik
383872615d
Remove kubectl reapers 2018-05-25 22:18:05 +02:00
Dong Liu
70426bb44b Update verbose level for kubectl test 2018-05-21 15:14:26 +08:00
Mikhail Mazurskiy
5e8e570dbd
Use Dial with context 2018-05-19 08:14:37 +10:00
David Eads
eabfcfaa2b start splitting polymorphic functions out of the factory 2018-05-17 08:55:31 -04:00
xuzhonghu
393324497f make use of simple dynamic client in test 2018-04-27 13:38:58 +08:00
Yu-Ju Hong
59741bdfbd Remove rkt references in the codebase 2018-04-06 12:02:11 -07:00
Kubernetes Submit Queue
88ce60542f
Merge pull request #61434 from djkonro/spell_fix
Automatic merge from submit-queue (batch tested with PRs 61434, 61501, 59609, 61467, 61531). 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>.

Grammar and spelling update

**What this PR does / why we need it**:
Some minor documentation grammar and spelling update

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-26 19:52:04 -07:00
Kubernetes Submit Queue
7cc193e9d6
Merge pull request #61251 from zjj2wry/kubectl-e2e-test
Automatic merge from submit-queue (batch tested with PRs 60632, 60806, 59471, 61251, 61013). 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 DNS service from kubectl comformance test

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

**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 #https://github.com/kubernetes/kubernetes/issues/61177

**Special notes for your reviewer**:
/assign @pwittrock
/assign @soltysh

**Release note**:

```release-note
NONE
```
2018-03-21 16:01:20 -07:00
djkonro
23588c7c69 Grammar and spelling update 2018-03-20 22:03:33 +01:00
zhengjiajin
69b079af76 remove DNS service from kubectl comformance test 2018-03-16 10:01:35 +08:00
Srini Brahmaroutu
62204f6262 Adding details to Conformance Tests using RFC 2119 standards. 2018-03-01 12:12:55 -08:00
fisherxu
fe033a4714 fix failed to access service of e2e test 2017-11-14 19:21:59 +08:00
supereagle
b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Kubernetes Submit Queue
ade0111190
Merge pull request #55050 from xiangpengzhao/clean-kubectl
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 version check in kubectl e2e test.

**What this PR does / why we need it**:
We don't need to check these versions for kubectl e2e tests in current cycle.

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

**Special notes for your reviewer**:
/cc @liggitt 
since you're also from sig-cli-maintainers :)

**Release note**:

```release-note
NONE
```
2017-11-03 12:56:08 -07:00
xiangpengzhao
32675e6f62 Remove check for SubResourcePodProxyVersion and SubResourceServiceAndNodeProxyVersion 2017-11-03 23:11:09 +08:00
xiangpengzhao
0242de0c5d Remove version check in kubectl e2e test. 2017-11-03 15:28:37 +08:00
Kubernetes Submit Queue
ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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 created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

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

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Jun Xiang Tee
efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -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