kubernetes/test/e2e
Tim Hockin b725fd20c2
Fix update/verify-mocks.sh
There appears to be a bug in `go generate` for workspaces which will be
fixed in the 1.22.1 release.
2024-02-29 22:06:00 -08:00
..
apimachinery update 129 2024-02-23 23:53:54 -05:00
apps e2e_apps:stop using deprecated framework.ExpectError 2024-02-27 13:46:36 +08: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 Skip autoscaling tests when we hit rate limits 2024-02-24 18:07:49 -05:00
chaosmonkey e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
cloud Merge pull request #121146 from shijinye/e2ecleanup-cloud-notequal 2024-02-05 08:44:53 -08:00
common Merge pull request #121606 from saschagrunert/user-namespaces-serial-test 2024-02-28 13:54:25 -08:00
dra dra e2e: fix stack unwinding in helper function 2024-02-19 17:11:04 +01:00
environment e2e labels: ensure that the lists remain sorted 2024-02-13 11:51:45 +01:00
feature Merge pull request #121606 from saschagrunert/user-namespaces-serial-test 2024-02-28 13:54:25 -08:00
framework Merge pull request #123138 from carlory/remove-ExpectNotEqual 2024-02-23 02:57:09 -08:00
instrumentation Skip autoscaling tests when we hit rate limits 2024-02-24 18:07:49 -05:00
kubectl remote command turn on feature gates 2024-02-27 02:05:24 +00:00
lifecycle e2e: use framework labels 2023-11-01 15:17:34 +01:00
network remove deprecated framework.ExpectNotEqual 2024-02-06 02:53:28 +08:00
node Fix panic in getNpdPodStat 2024-02-28 10:50:43 -05:00
nodefeature e2e labels: add placeholder docs for existing items 2024-02-13 11:57:36 +01: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 Add providerless tags appropriately in test/ 2024-01-07 08:16:05 -05:00
storage Fix update/verify-mocks.sh 2024-02-29 22:06:00 -08:00
testing-manifests remove --v arg from kubetest2-tester-ginkgo test args 2024-02-13 00:02:49 +00:00
upgrades Always test PDB's during service upgrade test 2024-02-15 14:22:46 +01:00
windows Merge pull request #120254 from ionutbalutoiu/windows-tests/conn-check-retries 2024-01-17 02:21:38 +01:00
e2e_test.go e2e: define features and node features 2023-10-10 18:15:49 +02:00
e2e-example-config.json
e2e.go e2e: replace klog.Fatal with assertion 2024-01-19 10:14:07 +01:00
providers.go import providers selectively based on the tag 2024-01-07 08:16:05 -05: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