e2e

package
v1.122.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeTestSetup added in v1.113.0

func BeforeTestSetup(f func())

BeforeTestSetup looks like a ginkgo setup node but runs the given function right away, i.e., during ginkgo's tree construction. It's sole purpose is to structure test setup code similar to BeforeEach and friends, while allowing to use the side effects when constructing further test nodes.

The primary use case is initializing `TestContext` structs that carry test state like clients, objects, etc. through common `It`s generated by helper functions. For example:

Context("Ordered test case", Ordered, func() {
  var c *TestContext
  BeforeTestSetup(func() {
    c = NewTestContext()
  })
  ItShouldDoStuff(c)
})

If the `TestContext` would be initialized in a setup node like BeforeEach, the helper function receive a nil param. The only alternative is implementing an initialization method on the `TestContext`. However, sharing the context variable in multiple containers (i.e., test cases) would require zeroing the context before the initialization, which is easy to forget and might lead to surprises.

func ItShouldEventuallyNotHaveOperationAnnotation added in v1.117.0

func ItShouldEventuallyNotHaveOperationAnnotation(komega komega.Komega, obj client.Object)

ItShouldEventuallyNotHaveOperationAnnotation checks if the given object does not have the gardener operation annotation set

func UseProviderLocalCoreDNSServer added in v1.101.0

func UseProviderLocalCoreDNSServer()

UseProviderLocalCoreDNSServer sets the golang DefaultResolver to the CoreDNS server deployed as part of the provider-local extension. This is port forwarded to the host on 172.18.255.1:5353. The tests can use this in-cluster CoreDNS server for name resolution and can therefore resolve the API endpoint of shoot clusters to the correct Istio instance (non-HA shoots are not exposed via 172.18.255.1 but via 172.18.255.{10,11,12}).

Types

This section is empty.

Jump to

Keyboard shortcuts

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