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 AssertFinalizers(t *testing.T, obj runtime.Object, finalizers []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 RemoveTempFile(file string) error
- func WriteToTempFile(pattern string, data []byte) (*os.File, error)
- type ManagedClusterBuilder
- func (b *ManagedClusterBuilder) Build() *clusterapiv1.ManagedCluster
- func (b *ManagedClusterBuilder) WithClaim(name, value string) *ManagedClusterBuilder
- func (b *ManagedClusterBuilder) WithDeletionTimestamp() *ManagedClusterBuilder
- func (b *ManagedClusterBuilder) WithLabel(name, value string) *ManagedClusterBuilder
- func (b *ManagedClusterBuilder) WithResource(resourceName clusterapiv1.ResourceName, allocatable, capacity string) *ManagedClusterBuilder
- func (b *ManagedClusterBuilder) WithTaint(taint *clusterapiv1.Taint) *ManagedClusterBuilder
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 AssertFinalizers ¶
AssertFinalizers asserts the given runtime object has the expected finalizers
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 RemoveTempFile ¶ added in v0.15.0
RemoveTempFile removes a temporary file if it exists.
func WriteToTempFile ¶ added in v0.15.0
WriteToTempFile writes data to a temporary file in the default directory for temporary files with the provided pattern and returns the file and an error if any. The permissions of the file are set to 0644 by default.
Types ¶
type ManagedClusterBuilder ¶ added in v1.0.0
type ManagedClusterBuilder struct {
// contains filtered or unexported fields
}
func NewManagedCluster ¶ added in v1.0.0
func NewManagedCluster(clusterName string) *ManagedClusterBuilder
func (*ManagedClusterBuilder) Build ¶ added in v1.0.0
func (b *ManagedClusterBuilder) Build() *clusterapiv1.ManagedCluster
func (*ManagedClusterBuilder) WithClaim ¶ added in v1.0.0
func (b *ManagedClusterBuilder) WithClaim(name, value string) *ManagedClusterBuilder
func (*ManagedClusterBuilder) WithDeletionTimestamp ¶ added in v1.0.0
func (b *ManagedClusterBuilder) WithDeletionTimestamp() *ManagedClusterBuilder
func (*ManagedClusterBuilder) WithLabel ¶ added in v1.0.0
func (b *ManagedClusterBuilder) WithLabel(name, value string) *ManagedClusterBuilder
func (*ManagedClusterBuilder) WithResource ¶ added in v1.0.0
func (b *ManagedClusterBuilder) WithResource(resourceName clusterapiv1.ResourceName, allocatable, capacity string) *ManagedClusterBuilder
func (*ManagedClusterBuilder) WithTaint ¶ added in v1.0.0
func (b *ManagedClusterBuilder) WithTaint(taint *clusterapiv1.Taint) *ManagedClusterBuilder