Commit Graph

74 Commits

Author SHA1 Message Date
Antonio Ojea
0826438d72 Revert "do not assume backend on e2e service jig"
This reverts commit 909a08d011.

Change-Id: Ie9ba4284ac739b3ea7eb57c44bb4551316121920
2023-03-07 15:12:22 +00:00
Patrick Ohly
136f89dfc5 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-02-06 15:39:13 +01:00
Antonio Ojea
7f5ae1c0c1
Revert "e2e: wait for pods with gomega" 2023-02-06 12:08:22 +01:00
Patrick Ohly
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +01:00
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Laszlo Janosi
9d75c958ce Fix review comments. Implement endpoint port validation that verifies the protocol, too. 2022-11-03 10:54:14 +02:00
Laszlo Janosi
82ce61afc7 KEP-1435 Mixed Protocol values in LoadBalancer Service GA
Removed the unit tests that test the cases when the MixedProtocolLBService feature flag was false - the feature flag is locked to true with GA
Added an integration test to test whether the API server accepts an LB Service with different protocols.
Added an e2e test to test whether a service which is exposed by a multi-protocol LB Service is accessible via both ports.
Removed the conditional validation that compared the new and the old Service definitions during an update - the feature flag is locked to true with GA.
2022-11-02 13:44:52 +02:00
Patrick Ohly
5614a9d064 e2e framework: eliminate interim sub packages
The "todo" packages were necessary while moving code around to avoid hitting
cyclic dependencies. Now that any sub package can depend on the framework, they
are no longer needed and the code can be moved into the normal sub packages.
2022-10-06 08:16:47 +02:00
Patrick Ohly
2c8ef492ae e2e framework: move kubectl and pod helper code 2022-10-06 08:16:47 +02:00
Antonio Ojea
909a08d011 do not assume backend on e2e service jig 2022-09-22 07:49:05 +02:00
Humble Chirammal
9e9fc2be88 various corrections in test/e2e package
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-16 18:59:30 +05:30
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Dave Chen
857458cfa5 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Antonio Ojea
020cf2d7aa e2e disable node port on loadbalancers 2021-11-20 20:24:37 +01:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Antonio Ojea
9d30eb88df retry apiserver errors on e2e service tests 2021-08-04 15:30:47 +02:00
Antonio Ojea
249db7ceb3 wait for endpoints to be available 2021-06-22 01:49:24 +02:00
Morten Torkildsen
66e722765a Update e2e tests to use the policy v1 api 2021-03-09 10:29:11 -05:00
Kubernetes Prow Robot
faa3a5fbd4
Merge pull request #99916 from swetharepakula/eps-ga-e2e
Promote Endpoint Slice E2E Tests to Conformance
2021-03-08 20:47:45 -08:00
Swetha Repakula
3ef94fbe3e Update e2e tests to use EndpointSlice v1 API 2021-03-08 09:44:47 -08:00
pacoxu
520ce44c55 skip test on External IP of NodePort in conformance test 2021-03-08 16:55:34 +08:00
Antonio Ojea
cf5d98b17e use utils/net ip family helpers 2021-02-22 18:43:59 +01:00
Antonio Ojea
21ccf1d7fb simplify clusterIP IP validation 2021-02-22 18:43:59 +01:00
Antonio Ojea
c9cbe41347 remove duplicate functions 2021-02-22 18:43:59 +01:00
Antonio Ojea
a2b57b9fb2 fix test udp reachability 2021-02-22 18:43:55 +01:00
jornshen
415fe230b4 check externalNameService more time 2021-01-29 19:02:58 +08:00
DP19
9e4642211a add e2e test for Service ExternalIPs 2020-11-22 00:57:29 +01:00
Antonio Ojea
76a9c8695a Revert "add e2e test for Service ExternalIPs"
This reverts commit 0ed8fd6dc9.

It turns out that ExternalIPs are not allowed to be reachable from
pods until the IP is present in the node.
However, due to a kube-proxy limitation it was working in environment
that used CNIs without bridges for the pods.
2020-11-05 10:35:24 +01:00
DP19
0ed8fd6dc9 add e2e test for Service ExternalIPs 2020-11-02 13:57:23 -05:00
Antonio Ojea
f31839acea e2e services wait for endpoint and endpoint slices
Since 1.19 endpoint slices is enabled by default, so all the e2e
tests should consider them.

The e2e networking tests for services use the jig object for
all the tests, but was not taking into account endpoint slices.

This considers endpoints slices for the method waitForAvailableEndpoint()

 Date:      Sun Aug 9 12:34:06 2020 +0200
2020-08-12 14:13:42 +02:00
knight42
1b9f11c9a9
fix(e2e): access nodes via test container in LB network tests
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-06-24 19:21:44 +08:00
Mateusz Matejczyk
af00593679 Revert "fix(e2e): access nodes via test container in LB network tests"
This reverts commit 708fb6b457, https://github.com/kubernetes/kubernetes/pull/91559

It looks like the PR has broken other network tests - https://k8s-testgrid.appspot.com/sig-scalability-gce#gce-master-scale-correctness
2020-06-15 08:42:17 +02:00
Kubernetes Prow Robot
84d745ffe4
Merge pull request #91559 from knight42/fix/e2e
e2e: access nodes via a test container
2020-06-10 04:39:31 -07:00
Kubernetes Prow Robot
089e8f48f2
Merge pull request #90720 from claudiubelu/tests/fqdn-svc-names
tests: Check FQDN for external services on Windows
2020-06-10 04:38:37 -07:00
Claudiu Belu
2a07efe925 tests: Check FQDN for external services on Windows
Windows does not support partially qualified domain names, which is why the test can fail.

Additionally, because nslookup may return 0 on Windows, even if the given DNS name was not
found, this issue was not observed until recently. We're now checking stderr as well.
2020-06-09 02:36:20 -07:00
knight42
708fb6b457
fix(e2e): access nodes via test container in LB network tests
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-06-09 14:32:31 +08:00
Laszlo Janosi
af33c2f7e8 Add CreateSCTPServiceWithPort() to the framework in preparation for the coming SCTP e2e tests 2020-04-22 15:59:59 +00:00
Kenichi Omichi
76833e2c37 Make WaitForAvailableEndpoint() local
WaitForAvailableEndpoint() is only used in e2eservice.
So this makes the function() local clearly.
2020-04-10 18:08:13 +00:00
wojtekt
268b51d023 Cleanup and fix networking test timeouts for large clusters 2020-04-02 17:19:41 +02:00
tanjunchen
9b9b27d768 test/e2e/framework /service and /pv:remove direct dependency to k8s.io/kubernetes/pkg/ 2020-03-27 01:11:13 +08:00
tanjunchen
b63be6a46d test/e2e/framework/service/:simplify function CreateTCPService 2020-03-01 22:33:42 +08:00
Anish Ramasekar
c811fc58ef
check ip family for node port connectivity test 2020-02-21 14:43:06 -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
danielqsj
6596a14d39 add missing alias of api errors under test 2019-12-26 17:29:38 +08:00
Jordan Liggitt
2164157113 Make e2e scale updates unconditional 2019-12-16 15:46:35 -05:00
Nan Yu
1fb0dd4ec5 Rename PodDisruptionsAllowed to DisruptionsAllowed in type PodDisruptionBudgetStatus 2019-12-03 14:26:35 -08:00
SataQiu
50bc528a7e e2e: move LogFailedContainers out of e2e test framework util.go 2019-11-15 10:21:26 +08:00