Documentation
¶
Index ¶
- func ClientFor(cfg *Config, clientOpts ...func(*clientgorest.Config)) (crclient.Client, error)
- func EventuallyObject[T client.Object](t *testing.T, ctx context.Context, objective string, ...)
- func EventuallyObjects[T client.Object](t *testing.T, ctx context.Context, objective string, ...)
- func RestConfig(cfg *Config) (*clientgorest.Config, error)
- type Condition
- type Config
- type EventuallyOption
- type EventuallyOptions
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventuallyObject ¶
func EventuallyObject[T client.Object](t *testing.T, ctx context.Context, objective string, getter func(context.Context) (T, error), predicates []Predicate[T], options ...EventuallyOption)
EventuallyObject polls until the predicate is fulfilled on the object.
func EventuallyObjects ¶
func EventuallyObjects[T client.Object](t *testing.T, ctx context.Context, objective string, getter func(context.Context) ([]T, error), groupPredicates []Predicate[[]T], predicates []Predicate[T], options ...EventuallyOption)
EventuallyObjects polls until the predicate is fulfilled on each of a set of objects.
func RestConfig ¶ added in v0.1.5
func RestConfig(cfg *Config) (*clientgorest.Config, error)
Types ¶
type Condition ¶
type Condition struct { Type string Status metav1.ConditionStatus Reason string Message string }
Condition is a generic structure required to adapt all the different concrete condition types into one.
func Conditions ¶
Conditions extracts conditions from the item and adapts them to the generic wrapper.
type Config ¶
type Config struct { // Images stored in an ACR that requires authentication to pull, but in different repositories. AliceImage string BobImage string // ARM resource ID for the puller MSI PullerResourceID string // Client ID for the puller MSI PullerClientID string // Tenant ID for the puller MSI PullerTenantID string // FQDN for the registry we're pulling from RegistryFQDN string // Label selector for the nodes we need to schedule to LabelSelector string // Path of authentication config for the AKS cluster. KubeconfigPath string }
func LoadConfig ¶
type EventuallyOption ¶
type EventuallyOption func(*EventuallyOptions)
EventuallyOption configures a
func WithDelayedStart ¶
func WithDelayedStart() EventuallyOption
WithDelayedStart configures the asynchronous assertion to start immediately.
func WithFilteredConditionDump ¶
func WithFilteredConditionDump(matchers ...Condition) EventuallyOption
WithFilteredConditionDump configures the asynchronous assertion to only dump the specified conditions.
func WithInterval ¶
func WithInterval(interval time.Duration) EventuallyOption
WithInterval sets the polling interval.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) EventuallyOption
WithTimeout sets the polling timeout.
func WithoutConditionDump ¶
func WithoutConditionDump() EventuallyOption
WithoutConditionDump configures the asynchronous assertion to dump conditions on failure.
type EventuallyOptions ¶
type EventuallyOptions struct {
// contains filtered or unexported fields
}
EventuallyOptions configure asynchronous assertion behavior.
type Predicate ¶
Predicate evaluates an object. Return whether the object in question matches your predicate, the reasons why or why not, and whether an error occurred. If determining that an object does not match a predicate, a message is required. Returning an error is fatal to the asynchronous assertion using this predicate.