Commit Graph

349 Commits

Author SHA1 Message Date
Arda Güçlü
dd1d49d17c Filter out the nodes created by other tests 2025-11-27 09:26:56 +03:00
Arda Güçlü
883b9e570a Wait the readiness of pods for all the containers generate logs 2025-09-19 13:25:50 +03:00
ylink-lfs
1fd7f308fc ci: remove httpd usage while using agnhost instead 2025-09-01 20:11:18 +08:00
Arda Güçlü
f336f4c75a Close response body after the conn is closed 2025-08-28 15:21:57 +03:00
Arda Güçlü
2608a38d47 Increase port-forward broken connection detection client timeout 2025-08-28 15:16:32 +03:00
PatrickLaabs
bc72fb81c3 chore: depr. pointer pkg replacement for test/e2e 2025-07-07 12:25:55 +02:00
Maciej Szulik
45449a78d5 Removing setting KUBECTL_KUBERC env var, now that it's on by default
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-06-17 11:14:47 +02:00
Arda Güçlü
b0370c483a Promote kuberc to beta
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-05-23 10:56:59 +02:00
Arda Güçlü
1ed6cf2196 Add e2e tests for kuberc 2025-05-14 13:06:03 +03:00
Kubernetes Prow Robot
b1ce2a61b5 Merge pull request #131249 from MaysaMacedo/randomize-name
Kubelet: Randomize ClusterRole name in e2e
2025-05-07 07:59:16 -07:00
Maysa Macedo
b1bb9a5885 Kubelet: Randomize ClusterRole name in e2e
It's possible that a conflict will happen when
attempting to create a `ClusterRole` resource
without a randomized name given that is a cluster
scoped object and another object with same name
might exist. This commit fixes this issue by ensuring
the name of the `ClusterRole` is randomized. Additionally,
it adds clean up for the clusterRole and clusterRoleBinding.
2025-05-06 14:30:10 -03:00
Benjamin Elder
540ea5949f skip kubectl proxy env tests when the host is localhost/loopback and would not be proxied 2025-04-24 22:40:05 -07:00
Benjamin Elder
4fa9639145 kubectl http proxy e2e: do not append os.Environ() redundantly 2025-03-25 15:08:34 -07:00
Wei Fu
dc59c0246f proxy: should add PingPeriod for websocket translator
IIUC, before using the translator handler, the ping data can be delivered from
the client to the runtime side since kube-apiserver does not parse any client
data. However, with WebSocket, the server responds with a pong to the client
without forwarding the data to the runtime side. If a proxy is present, it may
close the connection due to inactivity. SPDY's PingPeriod can help address this
issue.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
Co-authored-by: Antonio Ojea <aojea@google.com>
2025-02-14 10:16:18 -05:00
Antonio Ojea
af3b9e613d reduce dependencies in apimachinery net testing utils
Consumers of the kubernetes golang API and clients must use
k8s.io/api,apimachinery,client-go. This is also require to download all
the necessary dependencies.

The apimachinery code contains a testing util for proxies that is used
in client-go and in the kubectl e2e. Since the tests on e2e require
ginkgo and we want to ensure this testing library is not used in
production, we cast the interface to match one of those libraries, but
the problem is that this forces consumers of apimachinery to also
download the ginkgo library.

Since NewHTTPProxyHandler receives a testing.TB interface, there is no
need to cast the interface, if someone wants to use it by implementing a
testing interface it is already aware of the risks.
2025-02-11 08:21:37 +00:00
Maciej Szulik
4619a89eba e2e: expand error conditions when test-ing port-forward
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-01-30 19:07:28 +01:00
Kubernetes Prow Robot
e07aeb7c8b Merge pull request #129330 from pohly/log-client-go-transport
client-go/transport: structured, contextual logging
2025-01-27 09:01:23 -08:00
Patrick Ohly
a85f489b28 client-go/transport: structured, contextual logging
The revised logging emits one log entry at the start of
round-tripping ("Request") and another at the end ("Response"). This avoids the
risk that related output gets interleaved by other output.

No API changes are necessary. A contextual logger is picked up from the context
of the request that is being handled. The verbosity level of that logger is
checked to determine what is supposed to be logged. This enables reducing log
details on a by-request basis by storing a `logger.V(1)` in the context of the
request.

As before, logging only gets injected into request processing at -v6 or higher,
so normally there is no additional overhead.
2025-01-27 09:45:04 +01:00
Maciej Szulik
28896d2f90 e2e: bump port-forward timeout
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-01-24 18:31:53 +01:00
Kubernetes Prow Robot
a271299643 Merge pull request #129717 from esotsal/fix-128837
testing: Fix pod delete timeout failures after InPlacePodVerticalScaling Graduate to Beta commit
2025-01-21 15:50:47 -08:00
Sotiris Salloumis
c5fc4193bb Fix pod delete issues in podresize tests 2025-01-21 07:25:14 +01:00
Dan Winship
969ecabc0f Remove all references to v1.Endpoints from non-network e2e tests
kube-proxy does not look at Endpoints ever, so it is incorrect for a
test to assume that there is any correlation between whether Endpoints
exist and whether a Service is working. Tests should only be using the
v1.Endpoints API if they are explicitly testing the behavior of
v1.Endpoints, the Endpoints controller, or the EndpointSlice mirroring
controller. There is no reason for any non SIG Network tests to be
testing any of those things, so there should be no references to
v1.Endpoints in test/e2e outside of test/e2e/network.

Also, simplify some pointlessly complicated e2eservice code.
2025-01-20 17:04:46 -05:00
Kubernetes Prow Robot
ddfd02d568 Merge pull request #129687 from carlory/cleanup-gke
remove gke
2025-01-20 08:46:43 -08:00
carlory
aaac13fc6a remove gke from e2e 2025-01-20 21:50:46 +08:00
Maciej Szulik
5cd7325cd7 e2e: expand error conditions when test-ing port-forward
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-01-20 13:21:43 +01:00
Maciej Szulik
f886f3b7f1 e2e: expand error conditions when test-ing port-forward
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-01-13 11:15:26 +01:00
Maciej Szulik
9e87e99587 Add timeout for port-forward test
After removing a pod in port-forward test we wait for an error from POST
request. Since the POST doesn't have a timeout it hangs indefinitely, so
instead we're hitting a DefaultPodDeletionTimeout. To make sure the POST
fails this adds a timeout to ensure we'll always get that expected
error, rather than nil.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2024-11-15 17:48:24 +01:00
Maciej Szulik
0b1617ccef Clean error handling in port-forward
This commit introduces:
1. Cleanups in port-forwarding error handling code, which ensures that
   we only compare lowercased text always.
2. E2E verifying that when a pod is removed a port-forward is stopped.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2024-11-07 21:19:59 +01:00
Nic
dbe6b6657b fix: draining remote stream after port-forward connection broken
Signed-off-by: Nic <qianyong@api7.ai>
2024-11-07 21:19:59 +01:00
Arda Güçlü
1caf9a150b KEP-4292: Add e2e test for custom profile in kubectl debug (#127187)
* Remove KUBECTL_DEBUG_CUSTOM_PROFILE env var

* Add e2e test for custom profile in kubectl debug

* Keep feature flag until 1.33

* Update comment

* Simplify tests by relying on test framework functionality

* Rename import alias to better to pass verify-import-alias
2024-10-22 19:48:59 +01:00
Maciej Szulik
b51d6308a7 Reuse CreateTestCRD helper for kubectl e2e 2024-09-23 18:32:27 +02:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
Brian Pursley
39d24b0877 Add logging to show which unexpected events were received in kubectl events e2e test
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2024-05-23 20:33:17 -04:00
Kubernetes Prow Robot
df35f179ba Merge pull request #125077 from eddiezane/ez/fix-test-simple-pod
Reduce file descriptors created in test
2024-05-22 17:49:27 -07:00
Eddie Zaneski
49f85ca854 Reduce file descriptors created in test
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2024-05-22 16:35:37 -06:00
Benjamin Elder
12cbad2110 kubectl logs test: use agnhost pause instaed of fixed duration sleep 2024-05-22 12:40:56 -07:00
Eddie Zaneski
411e0094ac Prevent pods from completing before test runs
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2024-05-21 16:49:34 -06:00
Case Wylie
6db859eb5d feat: add all-pods log flag to kubectl
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
2024-05-14 09:03:09 -04:00
huweiwen
6ec421e2cf test/e2e: do not use global variable for image
We have "-kube-test-repo-list" command line flag to override the image registry. If we store it in global variable, then that overriding cannot take effect.

And this can cause puzzling bugs, e.g.: containerIsUnused() function will compare incorrect image address.
2024-04-22 19:29:39 +08:00
Antonio Ojea
f0730efd0a e2e stress exec 99% threshold 2024-04-08 22:11:44 +00:00
Antonio Ojea
f81cce61e6 e2e test to execute 1000 times in a container
with concurrency 10

Change-Id: Idf9aa8e22e62e718993ea82b23e1818e34556315
2024-04-07 19:34:40 +00:00
Filip Křepinský
7a57bcea6c fix e2e test for kubectl interactive delete 2024-03-05 19:57:28 +01:00
Kubernetes Prow Robot
d826407152 Merge pull request #122653 from ardaguclu/interactive-delete-e2e-test
Add e2e test for kubectl interactive delete
2024-03-05 03:08:59 -08:00
Sean Sullivan
a147693deb remote command turn on feature gates 2024-02-27 02:05:24 +00:00
Jordan Liggitt
e1ac3e1de7 Fix kubectl proxy e2e test 2024-02-22 23:50:23 -05:00
Arda Güçlü
7faa8bbac3 Add e2e test for kubectl interactive delete 2024-02-16 11:24:56 +03:00
Patrick Ohly
f2cfbf44b1 e2e: use framework labels
This changes the text registration so that tags for which the framework has a
dedicated API (features, feature gates, slow, serial, etc.) those APIs are
used.

Arbitrary, custom tags are still left in place for now.
2023-11-01 15:17:34 +01:00
Maciej Szulik
fba2d2fadc Move invocation to not to cause ginkgo panic 2023-10-31 17:50:43 +01:00
Sean Sullivan
168998e87b StreamTranslator and FallbackExecutor for WebSockets 2023-10-23 15:33:38 -07:00
Patrick Ohly
f2d34426f8 e2e: enhance SIGDescribe
framework.SIGDescribe is better because:
- Ginkgo uses the source code location of the test, not of the wrapper,
  when reporting progress.
- Additional annotations can be passed.

To make this a drop-in replacement, framework.SIGDescribe generates a function
that can be used instead of the former SIGDescribe functions.

windows.SIGDescribe contained some additional code to ensure that tests are
skipped when not running with a suitable node OS. This gets moved into a
separate wrapper generator, to allow using framework.SIGDescribe as intended.
To ensure that all callers were modified, the windows.sigDescribe isn't
exported anymore (wasn't necessary in the first place!).
2023-10-10 18:15:49 +02:00