e2e

package
v1.29.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 38 Imported by: 199

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterSuiteActions added in v1.18.0

func AfterSuiteActions(ctx context.Context)

AfterSuiteActions are actions that are run on ginkgo's SynchronizedAfterSuite

func RunE2ETests

func RunE2ETests(t *testing.T)

RunE2ETests checks configuration parameters (specified through flags) and then runs E2E tests using the Ginkgo runner. If a "report directory" is specified, one or more JUnit test reports will be generated in this directory, and cluster logs will also be saved. This function is called on each Ginkgo node in parallel mode.

Types

This section is empty.

Directories

Path Synopsis
gcp
dra
test-driver/app
Package app does all of the work necessary to configure and run a Kubernetes app process.
Package app does all of the work necessary to configure and run a Kubernetes app process.
Package environment contains pre-defined environments used by test/e2e and/or test/e2e_node.
Package environment contains pre-defined environments used by test/e2e and/or test/e2e_node.
Package feature contains pre-defined features used by test/e2e and/or test/e2e_node.
Package feature contains pre-defined features used by test/e2e and/or test/e2e_node.
Package framework contains provider-independent helper code for building and running E2E tests with Ginkgo.
Package framework contains provider-independent helper code for building and running E2E tests with Ginkgo.
config
Package config simplifies the declaration of configuration options.
Package config simplifies the declaration of configuration options.
debug/init
Package init sets debug.DumpAllNamespaceInfo as implementation in the framework and enables log size verification and resource gathering.
Package init sets debug.DumpAllNamespaceInfo as implementation in the framework and enables log size verification and resource gathering.
gpu
job
metrics/init
Package init installs GrabBeforeEach and GrabAfterEach as callbacks for gathering data before and after a test.
Package init installs GrabBeforeEach and GrabAfterEach as callbacks for gathering data before and after a test.
node/init
Package init registers node.AllNodesReady.
Package init registers node.AllNodesReady.
pod
pv
rc
ssh
testfiles
Package testfiles provides a wrapper around various optional ways of retrieving additional files needed during a test run: - builtin bindata - filesystem access
Package testfiles provides a wrapper around various optional ways of retrieving additional files needed during a test run: - builtin bindata - filesystem access
Package network are the end-to-end tests for Kubernetes networking.
Package network are the end-to-end tests for Kubernetes networking.
Package feature contains pre-defined node features used by test/e2e and/or test/e2e_node.
Package feature contains pre-defined node features used by test/e2e and/or test/e2e_node.
drivers/csi-test/driver
Package driver is a generated GoMock package.
Package driver is a generated GoMock package.
podlogs
Package podlogs enables live capturing of all events and log messages for some or all pods in a namespace as they get generated.
Package podlogs enables live capturing of all events and log messages for some or all pods in a namespace as they get generated.
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.
Package upgrades provides a framework for testing Kubernetes features before, during, and after different types of upgrades.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL