Documentation ¶
Index ¶
- Constants
- func DefaultUserTier() toolchainv1alpha1.UserTier
- func Modify(mur *toolchainv1alpha1.MasterUserRecord, modifiers ...MurModifier) error
- func ModifyUaInMur(mur *toolchainv1alpha1.MasterUserRecord, targetCluster string, ...)
- func NewMasterUserRecord(t *testing.T, userName string, modifiers ...MurModifier) *toolchainv1alpha1.MasterUserRecord
- func NewMasterUserRecords(t *testing.T, size int, nameFmt string, modifiers ...MurModifier) []runtime.Object
- type MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) AllUserAccountsHaveCluster(expected toolchainv1alpha1.Cluster) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) AllUserAccountsHaveCondition(expected toolchainv1alpha1.Condition) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) DoesNotExist() *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) DoesNotHaveFinalizer() *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) DoesNotHaveLabel(key string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) Exists() *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) Get() *toolchainv1alpha1.MasterUserRecord
- func (a *MasterUserRecordAssertion) HasAnnotationWithValue(key, value string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasConditions(expected ...toolchainv1alpha1.Condition) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasFinalizer() *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasLabel(key string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasLabelWithValue(key, value string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasNoConditions() *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasStatusUserAccounts(targetClusters ...string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasStatusUserAccountsWithCondition(targetCluster string, expected toolchainv1alpha1.Condition) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasTargetCluster(targetcluster string) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasTier(tier toolchainv1alpha1.UserTier) *MasterUserRecordAssertion
- func (a *MasterUserRecordAssertion) HasUserAccounts(count int) *MasterUserRecordAssertion
- type MasterUserRecordsAssertion
- type MurModifier
- func Account(cluster string, modifiers ...UaInMurModifier) MurModifier
- func AdditionalAccount(cluster string, modifiers ...UaInMurModifier) MurModifier
- func AdditionalAccounts(clusters ...string) MurModifier
- func DisabledMur(disabled bool) MurModifier
- func Finalizer(finalizer string) MurModifier
- func MetaNamespace(namespace string) MurModifier
- func ProvisionedMur(provisionedTime *metav1.Time) MurModifier
- func StatusCondition(con toolchainv1alpha1.Condition) MurModifier
- func StatusUserAccount(cluster string, conditions ...toolchainv1alpha1.Condition) MurModifier
- func Sub(sub string) MurModifier
- func TargetCluster(targetCluster string) MurModifier
- func TierName(tierName string) MurModifier
- func ToBeDeleted() MurModifier
- func UserID(userID string) MurModifier
- func UserIDFromUserSignup(userSignup *toolchainv1alpha1.UserSignup) MurModifier
- func WithAnnotation(key, value string) MurModifier
- func WithLabel(key, value string) MurModifier
- func WithOwnerLabel(owner string) MurModifier
- type NsTemplateSetSpecExp
- type UaInMurModifier
Constants ¶
const DefaultUserTierName = "deactivate30"
Variables ¶
This section is empty.
Functions ¶
func DefaultUserTier ¶
func DefaultUserTier() toolchainv1alpha1.UserTier
DefaultUserTier the default UserTier used to initialize the MasterUserRecord
func Modify ¶
func Modify(mur *toolchainv1alpha1.MasterUserRecord, modifiers ...MurModifier) error
func ModifyUaInMur ¶
func ModifyUaInMur(mur *toolchainv1alpha1.MasterUserRecord, targetCluster string, modifiers ...UaInMurModifier)
func NewMasterUserRecord ¶
func NewMasterUserRecord(t *testing.T, userName string, modifiers ...MurModifier) *toolchainv1alpha1.MasterUserRecord
func NewMasterUserRecords ¶
Types ¶
type MasterUserRecordAssertion ¶
type MasterUserRecordAssertion struct {
// contains filtered or unexported fields
}
func (*MasterUserRecordAssertion) AllUserAccountsHaveCluster ¶
func (a *MasterUserRecordAssertion) AllUserAccountsHaveCluster(expected toolchainv1alpha1.Cluster) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) AllUserAccountsHaveCondition ¶
func (a *MasterUserRecordAssertion) AllUserAccountsHaveCondition(expected toolchainv1alpha1.Condition) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) DoesNotExist ¶
func (a *MasterUserRecordAssertion) DoesNotExist() *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) DoesNotHaveFinalizer ¶
func (a *MasterUserRecordAssertion) DoesNotHaveFinalizer() *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) DoesNotHaveLabel ¶
func (a *MasterUserRecordAssertion) DoesNotHaveLabel(key string) *MasterUserRecordAssertion
DoesNotHaveLabel verifies that the MasterUserRecord does not have a label with the given key
func (*MasterUserRecordAssertion) Exists ¶
func (a *MasterUserRecordAssertion) Exists() *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) Get ¶
func (a *MasterUserRecordAssertion) Get() *toolchainv1alpha1.MasterUserRecord
func (*MasterUserRecordAssertion) HasAnnotationWithValue ¶
func (a *MasterUserRecordAssertion) HasAnnotationWithValue(key, value string) *MasterUserRecordAssertion
HasAnnotationWithValue verifies that the MasterUserRecord has an annotation with the given key and value
func (*MasterUserRecordAssertion) HasConditions ¶
func (a *MasterUserRecordAssertion) HasConditions(expected ...toolchainv1alpha1.Condition) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasFinalizer ¶
func (a *MasterUserRecordAssertion) HasFinalizer() *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasLabel ¶
func (a *MasterUserRecordAssertion) HasLabel(key string) *MasterUserRecordAssertion
HasLabel verifies that the MasterUserRecord has a label with the given key
func (*MasterUserRecordAssertion) HasLabelWithValue ¶
func (a *MasterUserRecordAssertion) HasLabelWithValue(key, value string) *MasterUserRecordAssertion
HasLabelWithValue verifies that the MasterUserRecord has a label with the given key and value
func (*MasterUserRecordAssertion) HasNoConditions ¶
func (a *MasterUserRecordAssertion) HasNoConditions() *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasStatusUserAccounts ¶
func (a *MasterUserRecordAssertion) HasStatusUserAccounts(targetClusters ...string) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasStatusUserAccountsWithCondition ¶
func (a *MasterUserRecordAssertion) HasStatusUserAccountsWithCondition(targetCluster string, expected toolchainv1alpha1.Condition) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasTargetCluster ¶
func (a *MasterUserRecordAssertion) HasTargetCluster(targetcluster string) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasTier ¶
func (a *MasterUserRecordAssertion) HasTier(tier toolchainv1alpha1.UserTier) *MasterUserRecordAssertion
func (*MasterUserRecordAssertion) HasUserAccounts ¶
func (a *MasterUserRecordAssertion) HasUserAccounts(count int) *MasterUserRecordAssertion
type MasterUserRecordsAssertion ¶
type MasterUserRecordsAssertion struct {
// contains filtered or unexported fields
}
func AssertThatMasterUserRecords ¶
func AssertThatMasterUserRecords(t test.T, client client.Client) *MasterUserRecordsAssertion
func (*MasterUserRecordsAssertion) HaveCount ¶
func (a *MasterUserRecordsAssertion) HaveCount(count int) *MasterUserRecordsAssertion
type MurModifier ¶
type MurModifier func(mur *toolchainv1alpha1.MasterUserRecord) error
func Account ¶
func Account(cluster string, modifiers ...UaInMurModifier) MurModifier
Account sets the first account on the MasterUserRecord
func AdditionalAccount ¶
func AdditionalAccount(cluster string, modifiers ...UaInMurModifier) MurModifier
AdditionalAccount sets an additional account on the MasterUserRecord
func AdditionalAccounts ¶
func AdditionalAccounts(clusters ...string) MurModifier
func DisabledMur ¶
func DisabledMur(disabled bool) MurModifier
DisabledMur creates a MurModifier to change the disabled spec value
func Finalizer ¶
func Finalizer(finalizer string) MurModifier
func MetaNamespace ¶
func MetaNamespace(namespace string) MurModifier
func ProvisionedMur ¶
func ProvisionedMur(provisionedTime *metav1.Time) MurModifier
ProvisionedMur creates a MurModifier to change the provisioned status value
func StatusCondition ¶
func StatusCondition(con toolchainv1alpha1.Condition) MurModifier
func StatusUserAccount ¶
func StatusUserAccount(cluster string, conditions ...toolchainv1alpha1.Condition) MurModifier
func Sub ¶
func Sub(sub string) MurModifier
func TargetCluster ¶
func TargetCluster(targetCluster string) MurModifier
func TierName ¶
func TierName(tierName string) MurModifier
func ToBeDeleted ¶
func ToBeDeleted() MurModifier
func UserID ¶
func UserID(userID string) MurModifier
func UserIDFromUserSignup ¶
func UserIDFromUserSignup(userSignup *toolchainv1alpha1.UserSignup) MurModifier
UserIDFromUserSignup creates a MurModifier to change the userID value to match the provided usersignup
func WithAnnotation ¶
func WithAnnotation(key, value string) MurModifier
WithAnnotation sets an annotation with the given key/value
func WithLabel ¶
func WithLabel(key, value string) MurModifier
WithLabel sets a label with the given key/value
func WithOwnerLabel ¶
func WithOwnerLabel(owner string) MurModifier
type NsTemplateSetSpecExp ¶
type NsTemplateSetSpecExp func(*toolchainv1alpha1.NSTemplateSetSpec)
func WithClusterRes ¶
func WithClusterRes(revision string) NsTemplateSetSpecExp
func WithNs ¶
func WithNs(nsType, revision string) NsTemplateSetSpecExp
func WithTier ¶
func WithTier(tier string) NsTemplateSetSpecExp
type UaInMurModifier ¶
type UaInMurModifier func(targetCluster string, mur *toolchainv1alpha1.MasterUserRecord)