Documentation ¶
Index ¶
- Variables
- func AppStudioEnvTier(t *testing.T, spec toolchainv1alpha1.NSTemplateTierSpec, options ...TierOption) *toolchainv1alpha1.NSTemplateTier
- func Base1nsTier(t *testing.T, spec toolchainv1alpha1.NSTemplateTierSpec, options ...TierOption) *toolchainv1alpha1.NSTemplateTier
- func NewNSTemplateTier(tierName string, nsTypes ...string) *toolchainv1alpha1.NSTemplateTier
- func OtherTier() *toolchainv1alpha1.NSTemplateTier
- func Tier(t *testing.T, name string, spec toolchainv1alpha1.NSTemplateTierSpec, ...) *toolchainv1alpha1.NSTemplateTier
- func TierWithoutDeactivationTimeout() *toolchainv1alpha1.NSTemplateTier
- type Assertion
- type TierOption
Constants ¶
This section is empty.
Variables ¶
var AppStudioEnvTemplates = toolchainv1alpha1.NSTemplateTierSpec{ Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{ { TemplateRef: "appstudio-env-88b275d-88b275d", }, }, ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{ TemplateRef: "appstudio-env-clusterresources-e0e1f34-e0e1f34", }, SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{ "admin": { TemplateRef: "appstudio-env-admin-ba5db27-ba5db27", }, "contributor": { TemplateRef: "appstudio-env-contributor-88b275d-88b275d", }, "maintainer": { TemplateRef: "appstudio-env-maintainer-0d170ba-0d170ba", }, }, SpaceRequestConfig: &toolchainv1alpha1.SpaceRequestConfig{ ServiceAccountName: toolchainv1alpha1.AdminServiceAccountName, }, }
AppStudioEnvTemplates current templates for the "appstudio-env" tier
var CurrentBase1nsTemplates = toolchainv1alpha1.NSTemplateTierSpec{ Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{ { TemplateRef: "base1ns-code-123456new", }, { TemplateRef: "base1ns-dev-123456new", }, { TemplateRef: "base1ns-stage-123456new", }, }, ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{ TemplateRef: "base1ns-clusterresources-123456new", }, SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{ "admin": { TemplateRef: "base1ns-admin-123456new", }, "edit": { TemplateRef: "base1ns-edit-123456new", }, "viewer": { TemplateRef: "base1ns-viewer-123456new", }, }, }
CurrentBase1nsTemplates current templates for the "base1ns" tier
var PreviousBase1nsTemplates = toolchainv1alpha1.NSTemplateTierSpec{ Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{ { TemplateRef: "base1ns-code-123456old", }, { TemplateRef: "base1ns-dev-123456old", }, { TemplateRef: "base1ns-stage-123456old", }, }, ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{ TemplateRef: "base1ns-clusterresources-123456old", }, SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{ "admin": { TemplateRef: "base1ns-admin-123456old", }, "viewer": { TemplateRef: "base1ns-viewer-123456old", }, }, }
PreviousBase1nsTemplates previous templates for the "base1ns" tier
Functions ¶
func AppStudioEnvTier ¶
func AppStudioEnvTier(t *testing.T, spec toolchainv1alpha1.NSTemplateTierSpec, options ...TierOption) *toolchainv1alpha1.NSTemplateTier
AppStudioEnvTier returns an "appstudio-env" NSTemplateTier with template refs in the given spec
func Base1nsTier ¶
func Base1nsTier(t *testing.T, spec toolchainv1alpha1.NSTemplateTierSpec, options ...TierOption) *toolchainv1alpha1.NSTemplateTier
Base1nsTier returns a "base1ns" NSTemplateTier with template refs in the given spec
func NewNSTemplateTier ¶
func NewNSTemplateTier(tierName string, nsTypes ...string) *toolchainv1alpha1.NSTemplateTier
func OtherTier ¶
func OtherTier() *toolchainv1alpha1.NSTemplateTier
OtherTier returns an "other" NSTemplateTier
func Tier ¶
func Tier(t *testing.T, name string, spec toolchainv1alpha1.NSTemplateTierSpec, options ...TierOption) *toolchainv1alpha1.NSTemplateTier
func TierWithoutDeactivationTimeout ¶
func TierWithoutDeactivationTimeout() *toolchainv1alpha1.NSTemplateTier
TierWithoutDeactivationTimeout returns a NSTemplateTier with no deactivation timeout set
Types ¶
type Assertion ¶
type Assertion struct {
// contains filtered or unexported fields
}
Assertion an assertion helper for an NSTemplateTier
func AssertThatNSTemplateTier ¶
AssertThatNSTemplateTier helper func to begin with the assertions on an NSTemplateTier
func (*Assertion) HasLatestUpdate ¶
func (a *Assertion) HasLatestUpdate(expected toolchainv1alpha1.NSTemplateTierHistory) *Assertion
HasLatestUpdate verifies the latest `status.updates`
func (*Assertion) HasStatusUpdatesItems ¶
HasStatusUpdatesItems verifies the number of items in `status.updates`
func (*Assertion) HasValidPreviousUpdates ¶
HasValidPreviousUpdates verifies the previous `status.updates` in particular, it checks that: - `StartTime` is not nil - `Hash` is not nil
type TierOption ¶
type TierOption func(*toolchainv1alpha1.NSTemplateTier)
TierOption an option to configure the NStemplateTier
func WithCurrentUpdate ¶
func WithCurrentUpdate() TierOption
WithCurrentUpdate appends an entry in the `status.updates` for the current tier
func WithPreviousUpdates ¶
func WithPreviousUpdates(entries ...toolchainv1alpha1.NSTemplateTierHistory) TierOption
WithPreviousUpdates adds the given entries in the `status.updates`
func WithoutClusterResources ¶
func WithoutClusterResources() TierOption
WithoutClusterResources removes the `clusterResources` templates from the tier's specs.
func WithoutCodeNamespace ¶
func WithoutCodeNamespace() TierOption
WithoutCodeNamespace removes the `code` templates from the tier's specs.