kubernetes/test/e2e
Quan Tian afefc6f4eb Make EndpointSlice API e2e test faster
EndpointSlices and Endpoints usually become ready pretty fast, but the
test always waited 5s before performing every check and it performed the
check 4 times in total, so unnecessarily extends the test 20s.

The commit changes the poll function to perform a check before waiting,
and reduces the interval to 2 seconds to align with other EndpointSlice
tests. It reduces the test duration from 30s to 4s.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-05 18:54:56 +08:00
..
apimachinery Merge pull request #122127 from dcbw/e2e-openapi-timeout 2023-12-14 06:17:59 +01:00
apps Merge pull request #121394 from pohly/e2e-framework-test-labels 2023-11-03 17:35:03 +01:00
architecture e2e: enhance SIGDescribe 2023-10-10 18:15:49 +02:00
auth ClusterTrustBundle projection: e2e test 2023-11-03 12:08:35 -07:00
autoscaling Merge pull request #118626 from borg-land/use-e2-instance-types 2024-01-04 16:49:14 +01:00
chaosmonkey e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
cloud add kubeup label instead of a feature label 2023-11-14 08:50:35 -08:00
common Merge pull request #121729 from gjkim42/promote-sidecar-e2e-to-beta 2024-01-04 17:59:03 +01:00
dra dra e2e: unify per-node resource specification 2023-12-21 12:43:28 +01:00
environment e2e: define environment 2023-11-01 09:38:59 +01:00
feature add kubeup label instead of a feature label 2023-11-14 08:50:35 -08:00
framework Merge pull request #122401 from jongwooo/hotfix/correct-typo-from-gingko-to-ginkgo 2023-12-21 06:42:10 +01:00
instrumentation e2e: use framework labels 2023-11-01 15:17:34 +01:00
kubectl e2e: use framework labels 2023-11-01 15:17:34 +01:00
lifecycle e2e: use framework labels 2023-11-01 15:17:34 +01:00
network Make EndpointSlice API e2e test faster 2024-01-05 18:54:56 +08:00
node Merge pull request #122240 from aravindhp/nlq-only-select-linux-nodes 2024-01-03 20:33:24 +01:00
nodefeature Remove NodeAlphaFeature label from sidecar e2e tests 2023-11-06 19:50:05 +09:00
perftype hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
reporters e2e: comment the known limitation of the ProgressReporter 2022-12-23 18:43:49 +08:00
scheduling e2e: pass context into pod helper functions 2023-11-14 15:57:55 +01:00
storage Correct typo from 'gingko' to 'ginkgo' 2023-12-20 10:31:53 +09:00
testing-manifests Remove unused csi-hostpath-testing.yaml 2024-01-02 09:06:29 -05:00
upgrades e2e upgrades: fix broken assertion 2023-10-26 13:25:00 +02:00
windows Removing Windows image from e2e test image utils 2024-01-02 15:53:12 -08:00
e2e_test.go e2e: define features and node features 2023-10-10 18:15:49 +02:00
e2e-example-config.json
e2e.go use PollUntilContextTimeout to replace PollImmediateWithContext in test 2023-10-19 22:50:21 +08:00
README.md e2e: use framework labels 2023-11-01 15:17:34 +01:00
suites.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00

test/e2e

This is home to e2e tests used for presubmit, periodic, and postsubmit jobs.

Some of these jobs are merge-blocking, some are release-blocking.

e2e test ownership

All e2e tests must adhere to the following policies:

  • the test must be owned by one and only one SIG
  • the test must live in/underneath a sig-owned package matching pattern: test/e2e/[{subpath}/]{sig}/..., e.g.
    • test/e2e/auth - all tests owned by sig-auth
    • test/e2e/common/storage - all tests common to cluster-level and node-level e2e tests, owned by sig-node
    • test/e2e/upgrade/apps - all tests used in upgrade testing, owned by sig-apps
  • each sig-owned package should have an OWNERS file defining relevant approvers and labels for the owning sig, e.g.
# test/e2e/node/OWNERS
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- alice
- bob
- cynthia
emeritus_approvers:
- dave
reviewers:
- sig-node-reviewers
labels:
- sig/node
  • packages that use {subpath} should have an imports.go file importing sig-owned packages (for ginkgo's benefit), e.g.
// test/e2e/common/imports.go
package common

import (
	// ensure these packages are scanned by ginkgo for e2e tests
	_ "k8s.io/kubernetes/test/e2e/common/network"
	_ "k8s.io/kubernetes/test/e2e/common/node"
	_ "k8s.io/kubernetes/test/e2e/common/storage"
)
  • test ownership must be declared via a top-level SIGDescribe call defined in the sig-owned package, e.g.
// test/e2e/lifecycle/framework.go
package lifecycle

import "k8s.io/kubernetes/test/e2e/framework"

// SIGDescribe annotates the test with the SIG label.
var SIGDescribe = framework.SIGDescribe("cluster-lifecycle")
// test/e2e/lifecycle/bootstrap/bootstrap_signer.go

package bootstrap

import (
	"github.com/onsi/ginkgo"
	"k8s.io/kubernetes/test/e2e/lifecycle"
)
var _ = lifecycle.SIGDescribe("cluster", feature.BootstrapTokens, func() {
  /* ... */
  ginkgo.It("should sign the new added bootstrap tokens", func(ctx context.Context) {
    /* ... */
  })
  /* etc */
})

These polices are enforced:

  • via the merge-blocking presubmit job pull-kubernetes-verify
  • which ends up running hack/verify-e2e-test-ownership.sh
  • which can also be run via make verify WHAT=e2e-test-ownership

more info

See kubernetes/community/.../e2e-tests.md