Documentation ¶
Index ¶
- Variables
- func AtLeastVersion(t *testing.T, minor int) bool
- func Eventually(t testing.TB, fn func() bool)
- func NewClient(t testing.TB) client.Client
- func NewClientWithInterceptors(t testing.TB, ict *interceptor.Funcs) client.Client
- func NewContext(t *testing.T) context.Context
- func NewReadOnlyClient(t testing.TB, objs ...runtime.Object) client.Client
- func SomewhatEventually(t testing.TB, dur time.Duration, fn func() bool)
- func WithFakeExecutor(t *testing.T, mgr *Manager, sh execution.SynthesizerHandle)
- type Manager
- type TestManagerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var Backoff = wait.Backoff{ Steps: 10, Duration: 10 * time.Millisecond, Factor: 2.0, Jitter: 0.1, Cap: time.Minute, }
Functions ¶
func Eventually ¶
func NewReadOnlyClient ¶ added in v0.0.6
func WithFakeExecutor ¶ added in v0.0.10
func WithFakeExecutor(t *testing.T, mgr *Manager, sh execution.SynthesizerHandle)
Types ¶
type Manager ¶
type Manager struct { ctrl.Manager RestConfig *rest.Config DownstreamRestConfig *rest.Config // may or may not == RestConfig DownstreamClient client.Client // may or may not == Manager.GetClient() DownstreamEnv *envtest.Environment }
func NewManager ¶
func NewManager(t *testing.T, testOpts ...TestManagerOption) *Manager
NewManager starts one or two envtest environments depending on the env. This should work seamlessly when run locally assuming binaries have been fetched with setup-envtest. In CI the second environment is used to compatibility test against a matrix of k8s versions. This compatibility testing is tightly coupled to the github action and not expected to work locally.
func (*Manager) GetCurrentResourceSlices ¶ added in v0.0.2
type TestManagerOption ¶ added in v0.0.4
func WithCompositionNamespace ¶ added in v0.0.6
func WithCompositionNamespace(ns string) TestManagerOption
func WithPodNamespace ¶ added in v0.0.4
func WithPodNamespace(ns string) TestManagerOption
Click to show internal directories.
Click to hide internal directories.