Documentation ¶
Index ¶
- func BundleHasSynced(ctx context.Context, cl client.Client, name, namespace, expectedData string) bool
- func BundleHasSyncedAllNamespaces(ctx context.Context, cl client.Client, name, expectedData string) bool
- func NewTestBundle(ctx context.Context, cl client.Client, opts bundle.Options, td TestData) *trustapi.Bundle
- func RunSuite(t *testing.T, suiteName, artifactDir string)
- type TestData
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.
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".