Documentation ¶
Index ¶
- func ParseResourcesFromFilesystem(t T, files fs.FS, path string) []*pbresource.Resource
- func RequireOwner(t T, res *pbresource.Resource, owner *pbresource.ID, ignoreUid bool)
- func RequireReconciledCurrentGen(t T, res *pbresource.Resource, statusKey string)
- func RequireResourceMeta(t T, res *pbresource.Resource, key string, value string)
- func RequireStatusCondition(t T, res *pbresource.Resource, statusKey string, ...)
- func RequireStatusConditionForCurrentGen(t T, res *pbresource.Resource, statusKey string, ...)
- func RequireVersionChanged(t T, res *pbresource.Resource, version string)
- func RequireVersionUnchanged(t T, res *pbresource.Resource, version string)
- func Resource(rtype *pbresource.Type, name string) *resourceBuilder
- type CleanupT
- type Client
- func (client *Client) PublishResources(t T, resources []*pbresource.Resource)
- func (client *Client) RequireReconciledCurrentGen(t T, id *pbresource.ID, statusKey string) *pbresource.Resource
- func (client *Client) RequireResourceExists(t T, id *pbresource.ID) *pbresource.Resource
- func (client *Client) RequireResourceMeta(t T, id *pbresource.ID, key string, value string) *pbresource.Resource
- func (client *Client) RequireResourceNotFound(t T, id *pbresource.ID)
- func (client *Client) RequireStatusCondition(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
- func (client *Client) RequireStatusConditionForCurrentGen(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
- func (client *Client) RequireVersionChanged(t T, id *pbresource.ID, version string) *pbresource.Resource
- func (client *Client) RequireVersionUnchanged(t T, id *pbresource.ID, version string) *pbresource.Resource
- func (client *Client) ResolveResourceID(t T, id *pbresource.ID) *pbresource.ID
- func (client *Client) SetRetryerConfig(timeout time.Duration, wait time.Duration)
- func (client *Client) WaitForNewVersion(t T, id *pbresource.ID, version string) *pbresource.Resource
- func (client *Client) WaitForReconciliation(t T, id *pbresource.ID, statusKey string) *pbresource.Resource
- func (client *Client) WaitForResourceState(t T, id *pbresource.ID, verify func(T, *pbresource.Resource)) *pbresource.Resource
- func (client *Client) WaitForStatusCondition(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseResourcesFromFilesystem ¶
ParseResourcesFromFilesystem will walk the filesystem at the given path and parse all files as protobuf/JSON resources.
func RequireOwner ¶
func RequireOwner(t T, res *pbresource.Resource, owner *pbresource.ID, ignoreUid bool)
func RequireReconciledCurrentGen ¶
func RequireReconciledCurrentGen(t T, res *pbresource.Resource, statusKey string)
func RequireResourceMeta ¶
func RequireResourceMeta(t T, res *pbresource.Resource, key string, value string)
func RequireStatusCondition ¶
func RequireStatusCondition(t T, res *pbresource.Resource, statusKey string, condition *pbresource.Condition)
func RequireStatusConditionForCurrentGen ¶
func RequireStatusConditionForCurrentGen(t T, res *pbresource.Resource, statusKey string, condition *pbresource.Condition)
func RequireVersionChanged ¶
func RequireVersionChanged(t T, res *pbresource.Resource, version string)
func RequireVersionUnchanged ¶
func RequireVersionUnchanged(t T, res *pbresource.Resource, version string)
func Resource ¶
func Resource(rtype *pbresource.Type, name string) *resourceBuilder
Types ¶
type Client ¶
type Client struct { pbresource.ResourceServiceClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(client pbresource.ResourceServiceClient) *Client
func (*Client) PublishResources ¶
func (client *Client) PublishResources(t T, resources []*pbresource.Resource)
func (*Client) RequireReconciledCurrentGen ¶
func (client *Client) RequireReconciledCurrentGen(t T, id *pbresource.ID, statusKey string) *pbresource.Resource
func (*Client) RequireResourceExists ¶
func (client *Client) RequireResourceExists(t T, id *pbresource.ID) *pbresource.Resource
func (*Client) RequireResourceMeta ¶
func (client *Client) RequireResourceMeta(t T, id *pbresource.ID, key string, value string) *pbresource.Resource
func (*Client) RequireResourceNotFound ¶
func (client *Client) RequireResourceNotFound(t T, id *pbresource.ID)
func (*Client) RequireStatusCondition ¶
func (client *Client) RequireStatusCondition(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
func (*Client) RequireStatusConditionForCurrentGen ¶
func (client *Client) RequireStatusConditionForCurrentGen(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
func (*Client) RequireVersionChanged ¶
func (client *Client) RequireVersionChanged(t T, id *pbresource.ID, version string) *pbresource.Resource
func (*Client) RequireVersionUnchanged ¶
func (client *Client) RequireVersionUnchanged(t T, id *pbresource.ID, version string) *pbresource.Resource
func (*Client) ResolveResourceID ¶
func (client *Client) ResolveResourceID(t T, id *pbresource.ID) *pbresource.ID
ResolveResourceID will read the specified resource and returns its full ID. This is mainly useful to get the ID with the Uid filled out.
func (*Client) SetRetryerConfig ¶
func (*Client) WaitForNewVersion ¶
func (client *Client) WaitForNewVersion(t T, id *pbresource.ID, version string) *pbresource.Resource
func (*Client) WaitForReconciliation ¶
func (client *Client) WaitForReconciliation(t T, id *pbresource.ID, statusKey string) *pbresource.Resource
func (*Client) WaitForResourceState ¶
func (client *Client) WaitForResourceState(t T, id *pbresource.ID, verify func(T, *pbresource.Resource)) *pbresource.Resource
func (*Client) WaitForStatusCondition ¶
func (client *Client) WaitForStatusCondition(t T, id *pbresource.ID, statusKey string, condition *pbresource.Condition) *pbresource.Resource
type T ¶
type T interface { Helper() Log(args ...interface{}) Logf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) FailNow() }
T represents the subset of testing.T methods that will be used by the various functionality in this package
Click to show internal directories.
Click to hide internal directories.