kubernetes/test/e2e
Ciprian Hacman d01e9cedb1 Clean up logic for deprecated flag --container-runtime in scripts
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-20 11:19:08 +02:00
..
apimachinery tests: Lowers the number of pods returned by estimateMaximumPods 2021-12-11 08:54:02 -08:00
apps It is weird that lastScheduleTime is earlier than creationTime 2022-01-13 14:07:38 +08:00
architecture conformance tests should have at least 2 untainted nodes 2021-11-10 16:32:30 +01:00
auth Clean up dockershim in tests 2021-12-22 13:05:34 +02:00
autoscaling Merge pull request #103252 from pacoxu/defer-fix 2022-01-06 12:50:00 -08:00
chaosmonkey test: fix typo in chaosmonkey.go 2021-03-21 12:20:00 +09:00
cloud Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
common Merge pull request #106624 from Ahmed-Aghadi/codeEnhanceCommonStorage 2022-01-06 08:57:25 -08:00
framework Clean up logic for deprecated flag --container-runtime in scripts 2022-01-20 11:19:08 +02:00
instrumentation OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
kubectl Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
lifecycle OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
network Fix topology hints test 2022-01-19 10:33:26 +08:00
node Clean up dockershim in tests 2021-12-22 13:05:34 +02:00
perftype hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
reporters hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
scheduling Remove skip Multi-AZ test based on provider 2022-01-11 10:38:41 -05:00
storage Validate OWNERS files - remove sections about emeritus reviewers 2022-01-13 20:40:01 -05:00
testing-manifests OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
ui hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
upgrades Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
windows OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
e2e_test.go conformance tests should have at least 2 untainted nodes 2021-11-10 16:32:30 +01:00
e2e-example-config.json
e2e.go remove ReallyCrashForTesting and cleaned up some references to HandleCrash behavior 2021-11-29 20:00:10 +00:00
README.md test/e2e: Add ownership info to README 2021-03-17 16:48:11 -04:00
suites.go e2e: grab controller and scheduler metrics via port forwarding 2021-06-16 12:02:40 +02: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 "github.com/onsi/ginkgo"

// SIGDescribe annotates the test with the SIG label.
func SIGDescribe(text string, body func()) bool {
	return ginkgo.Describe("[sig-cluster-lifecycle] "+text, body)
}
// test/e2e/lifecycle/bootstrap/bootstrap_signer.go

package bootstrap

import (
	"github.com/onsi/ginkgo"
	"k8s.io/kubernetes/test/e2e/lifecycle"
)
var _ = lifecycle.SIGDescribe("[Feature:BootstrapTokens]", func() {
  /* ... */
  ginkgo.It("should sign the new added bootstrap tokens", func() {
    /* ... */
  })
  /* 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