Documentation ¶
Index ¶
- func AssertAction(t *testing.T, actual clienttesting.Action, expected string)
- func AssertActions(t *testing.T, actualActions []clienttesting.Action, expectedVerbs ...string)
- func AssertCondition(t *testing.T, actualConditions []metav1.Condition, ...)
- func AssertDelete(t *testing.T, actual clienttesting.Action, resource, namespace, name string)
- func AssertEqualNameNamespace(t *testing.T, actualName, actualNamespace, name, namespace string)
- func AssertEqualNumber(t *testing.T, actual, expected int)
- func AssertError(t *testing.T, actual error, expectedErr string)
- func AssertErrorWithPrefix(t *testing.T, actual error, expectedErrorPrefix string)
- func AssertGet(t *testing.T, actual clienttesting.Action, group, version, resource string)
- func AssertNoActions(t *testing.T, actualActions []clienttesting.Action)
- func AssertNoMoreUpdates(t *testing.T, actions []clienttesting.Action)
- func AssertUpdateActions(t *testing.T, actions []clienttesting.Action)
- func NewUnstructured(apiVersion, kind, namespace, name string, owners ...metav1.OwnerReference) *unstructured.Unstructured
- func NewUnstructuredSecret(namespace, name string, terminated bool, uid string, ...) *unstructured.Unstructured
- func NewUnstructuredWithContent(apiVersion, kind, namespace, name string, content map[string]interface{}) *unstructured.Unstructured
- type FakeSyncContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAction ¶
func AssertAction(t *testing.T, actual clienttesting.Action, expected string)
func AssertActions ¶
func AssertActions(t *testing.T, actualActions []clienttesting.Action, expectedVerbs ...string)
AssertActions asserts the actual actions have the expected action verb
func AssertCondition ¶
func AssertCondition( t *testing.T, actualConditions []metav1.Condition, expectedCondition metav1.Condition)
AssertCondition asserts the actual conditions has the expected condition
func AssertDelete ¶
func AssertDelete(t *testing.T, actual clienttesting.Action, resource, namespace, name string)
func AssertEqualNumber ¶
func AssertError ¶
AssertError asserts the actual error representation is the same with the expected, if the expected error representation is empty, the actual should be nil
func AssertErrorWithPrefix ¶
AssertError asserts the actual error representation starts with the expected prerfix, if the expected error prefix is empty, the actual should be nil
func AssertGet ¶
func AssertGet(t *testing.T, actual clienttesting.Action, group, version, resource string)
func AssertNoActions ¶
func AssertNoActions(t *testing.T, actualActions []clienttesting.Action)
AssertNoActions asserts no actions are happened
func AssertNoMoreUpdates ¶
func AssertNoMoreUpdates(t *testing.T, actions []clienttesting.Action)
AssertNoMoreUpdates asserts only one update action in given actions
func AssertUpdateActions ¶
func AssertUpdateActions(t *testing.T, actions []clienttesting.Action)
AssertUpdateActions asserts the actions are get-then-update action
func NewUnstructured ¶ added in v0.14.0
func NewUnstructured(apiVersion, kind, namespace, name string, owners ...metav1.OwnerReference) *unstructured.Unstructured
func NewUnstructuredSecret ¶ added in v0.14.0
func NewUnstructuredSecret(namespace, name string, terminated bool, uid string, owners ...metav1.OwnerReference) *unstructured.Unstructured
func NewUnstructuredWithContent ¶ added in v0.14.0
func NewUnstructuredWithContent( apiVersion, kind, namespace, name string, content map[string]interface{}) *unstructured.Unstructured
Types ¶
type FakeSyncContext ¶
type FakeSyncContext struct {
// contains filtered or unexported fields
}
func NewFakeSyncContext ¶
func NewFakeSyncContext(t *testing.T, clusterName string) *FakeSyncContext
func (FakeSyncContext) Queue ¶
func (f FakeSyncContext) Queue() workqueue.RateLimitingInterface
func (FakeSyncContext) QueueKey ¶
func (f FakeSyncContext) QueueKey() string
func (FakeSyncContext) Recorder ¶
func (f FakeSyncContext) Recorder() events.Recorder
Click to show internal directories.
Click to hide internal directories.