Documentation ¶
Index ¶
- Variables
- func AllDefaultObjects(t *testing.T, config *configuration.Data) environment.Objects
- func CountObjectsThat(objects environment.Objects, is func(map[interface{}]interface{}) bool) int
- func CreateAndMockUser(t *testing.T, sub string, internal, persist bool) context.Context
- func CreateAndMockUserAndToken(t *testing.T, sub string, internal bool) context.Context
- func CreateAndMockUserAndTokenPersisted(t *testing.T, sub string, internal bool) context.Context
- func CreateAndMockUserWithUsername(t *testing.T, sub, username string, internal, persist bool) context.Context
- func CreateAndMockUserWithUsernameAndTokenPersisted(t *testing.T, sub, username string, internal bool) context.Context
- func ExpectedNumberOfCallsWhenClean(envTypes ...environment.Type) int
- func ExpectedNumberOfCallsWhenPatch(t *testing.T, config *configuration.Data, envTypes ...environment.Type) int
- func ExpectedNumberOfCallsWhenPost(t *testing.T, config *configuration.Data) int
- func GetMappedVersions(envTypes ...environment.Type) map[environment.Type]string
- func MockCleanRequestsToOS(calls *int, cluster string)
- func MockCommunicationWithAuth(cluster string, otherClusters ...string)
- func MockCommunicationWithAuthSettingCapacityFlag(cluster string, capacityExhausted, persist bool, otherClusters ...string)
- func MockPatchRequestsToOS(calls *int, cluster string)
- func MockPostRequestsToOS(calls *int, cluster string, envs []environment.Type, nsBaseName string)
- func MockRemoveRequestsToOS(calls *int, cluster string)
- func NewAuthService(t *testing.T, cassetteFile, authURL, saToken string, ...) (auth.Service, func())
- func NewAuthServiceWithRecorder(t *testing.T, cassetteFile, authURL, saToken string, ...) (auth.Service, *vcrrecorder.Recorder, func())
- func NewOSService(config *configuration.Data, modifier UserModifier, ...) *openshift.ServiceBuilder
- func NewUserDataWithTenantConfig(templatesRepo, templatesRepoBlob, templatesRepoDir string) *authclient.UserDataAttributes
- func NumberOfGetChecks(objects environment.Objects) int
- func NumberOfObjectsToRemove(objects environment.Objects) int
- func PrepareConfigClusterAndAuthService(t *testing.T) (cluster.Service, auth.Service, *configuration.Data, func())
- func PrepareConfigClusterAndAuthServiceWithRefreshInt(refreshInt time.Duration, t *testing.T) (cluster.Service, auth.Service, *configuration.Data, func())
- func RetrieveObjects(t *testing.T, config *configuration.Data, clusterMapping cluster.ForType, ...) environment.Objects
- func SetTemplateSameVersion(version string)
- func SetTemplateVersions()
- func SingleClusterMapping(url, user, token string) cluster.ForType
- func SingleTemplatesObjects(t *testing.T, config *configuration.Data, envType environment.Type, ...) environment.Objects
- func SingleTemplatesObjectsWithDefaults(t *testing.T, config *configuration.Data, envType environment.Type) environment.Objects
- type UserInfo
- type UserModifier
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClusterMapping = SingleClusterMapping("http://api.cluster1/", "clusterUser", defaultClusterToken.Raw)
View Source
var DefaultUserInfo = UserInfo{
OsUsername: "developer",
OsUserToken: "HMs8laMmBSsJi8hpMDOtiglbXJ-2eyymE1X46ax5wX8",
NsBaseName: "developer",
}
Functions ¶
func AllDefaultObjects ¶
func AllDefaultObjects(t *testing.T, config *configuration.Data) environment.Objects
func CountObjectsThat ¶
func CountObjectsThat(objects environment.Objects, is func(map[interface{}]interface{}) bool) int
func CreateAndMockUser ¶
func ExpectedNumberOfCallsWhenClean ¶
func ExpectedNumberOfCallsWhenClean(envTypes ...environment.Type) int
func ExpectedNumberOfCallsWhenPatch ¶
func ExpectedNumberOfCallsWhenPatch(t *testing.T, config *configuration.Data, envTypes ...environment.Type) int
func ExpectedNumberOfCallsWhenPost ¶
func ExpectedNumberOfCallsWhenPost(t *testing.T, config *configuration.Data) int
func GetMappedVersions ¶
func GetMappedVersions(envTypes ...environment.Type) map[environment.Type]string
func MockCleanRequestsToOS ¶
func MockPatchRequestsToOS ¶
func MockPostRequestsToOS ¶
func MockPostRequestsToOS(calls *int, cluster string, envs []environment.Type, nsBaseName string)
func MockRemoveRequestsToOS ¶
func NewAuthService ¶
func NewOSService ¶
func NewOSService(config *configuration.Data, modifier UserModifier, repository tenant.Repository) *openshift.ServiceBuilder
func NewUserDataWithTenantConfig ¶
func NewUserDataWithTenantConfig(templatesRepo, templatesRepoBlob, templatesRepoDir string) *authclient.UserDataAttributes
func NumberOfGetChecks ¶
func NumberOfGetChecks(objects environment.Objects) int
func NumberOfObjectsToRemove ¶
func NumberOfObjectsToRemove(objects environment.Objects) int
func RetrieveObjects ¶
func RetrieveObjects(t *testing.T, config *configuration.Data, clusterMapping cluster.ForType, userInfo UserInfo, envTypes ...environment.Type) environment.Objects
func SetTemplateSameVersion ¶
func SetTemplateSameVersion(version string)
func SetTemplateVersions ¶
func SetTemplateVersions()
func SingleClusterMapping ¶
func SingleTemplatesObjects ¶
func SingleTemplatesObjects(t *testing.T, config *configuration.Data, envType environment.Type, clusterMapping cluster.ForType, userInfo UserInfo) environment.Objects
func SingleTemplatesObjectsWithDefaults ¶
func SingleTemplatesObjectsWithDefaults(t *testing.T, config *configuration.Data, envType environment.Type) environment.Objects
Types ¶
type UserModifier ¶
func AddUser ¶
func AddUser(osUsername string) UserModifier
func (UserModifier) NewUserInfo ¶
func (m UserModifier) NewUserInfo(nsBaseName string) UserInfo
func (UserModifier) WithData ¶
func (m UserModifier) WithData(data *authclient.UserDataAttributes) UserModifier
func (UserModifier) WithToken ¶
func (m UserModifier) WithToken(osUserToken string) UserModifier
Click to show internal directories.
Click to hide internal directories.