env

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleHasSynced

func BundleHasSynced(ctx context.Context, cl client.Client, name, namespace, expectedData string) bool

BundleHasSynced will return true if the given Bundle has synced the expected data to targets in all namespaces. Skips Namespaces that are Terminating since targets are not synced there. Ensures the Bundle status has been updated with the appropriate target. Ensures the Bundle has the correct status condition with the same ObservedGeneration as the current Generation.

func BundleHasSyncedAllNamespaces added in v0.2.0

func BundleHasSyncedAllNamespaces(ctx context.Context, cl client.Client, name, expectedData string) bool

BundleHasSyncedAllNamespaces calls BundleHasSynced for all namespaces.

func NewTestBundle

func NewTestBundle(ctx context.Context, cl client.Client, opts bundle.Options, td TestData) *trustapi.Bundle

newTestBundle creates a new Bundle in the API using the input test data. Returns the create Bundle object.

func RunSuite

func RunSuite(t *testing.T, suiteName, artifactDir string)

Types

type TestData

type TestData struct {
	Sources struct {
		ConfigMap struct {
			trustapi.SourceObjectKeySelector
			Data string
		}
		Secret struct {
			trustapi.SourceObjectKeySelector
			Data string
		}
		InLine struct {
			Data string
		}
	}

	Target trustapi.KeySelector
}

TestData is used as a set of input data to a Bundle suite test. It represents a subset of the Bundle API spec.

func DefaultTrustData

func DefaultTrustData() TestData

DefaultTrustData returns a well-known set of default data for a test. Resulting Bundle will sync "A\nB\nC\n" to the Target "target-key".

Jump to

Keyboard shortcuts

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