Documentation ¶
Index ¶
- Constants
- Variables
- func AddLineToFile(line, filename string) error
- func AppendImageDefaultValues(image *api.Image)
- func BumpEvents(namespace string) error
- func CheckCliBinaryExist() (bool, error)
- func CheckPodHasImagePullSecretWithPrefix(pod *corev1.Pod, imagePullSecretPrefix string) bool
- func CheckPodsAreReady(pods *corev1.PodList) bool
- func CheckPodsByDeploymentConfigInError(namespace string, dcName string) func() (bool, error)
- func CheckPodsByDeploymentInError(namespace string, dName string) func() (bool, error)
- func CheckPodsInNamespaceInError(namespace string) func() (bool, error)
- func CheckPodsWithLabelInError(namespace, labelName, labelValue string) func() (bool, error)
- func CheckPodsWithLabelsInError(namespace string, labels map[string]string) func() (bool, error)
- func CheckSetup() error
- func ClearNamespaceHistory()
- func CompleteTask(...) (err error)
- func CompleteTaskByUser(...) (err error)
- func ConstructDefaultImageFullTag(imageName string) string
- func CreateConfigMap(namespace, name string, data map[string]string, binaryData map[string][]byte) error
- func CreateFile(folder, fileName, fileContent string) error
- func CreateFolder(folder string) error
- func CreateInfinispanSecret(namespace, name string, credentialsMap map[string]string) error
- func CreateInsecureImageStream(namespace, imageStreamName, imageTag, imageFullName string) error
- func CreateKogitoOperatorCatalogSource() (*olmapiv1alpha1.CatalogSource, error)
- func CreateMongoDBSecret(namespace, name, password string) error
- func CreateNamespace(namespace string) error
- func CreateNamespaceIfNotExists(namespace string) (exists bool, err error)
- func CreateNamespacedSubscriptionIfNotExist(namespace string, subscriptionName string, operatorName string, ...) (*olmapiv1alpha1.Subscription, error)
- func CreateObject(o client.Object) error
- func CreateOperatorGroupIfNotExists(namespace, operatorGroupName string) (*olmapiv1.OperatorGroup, error)
- func CreatePostgresqlInstance(namespace, name string, nbPods int, username, password, databaseName string) error
- func CreateSecret(namespace, name string, secretContent map[string]string) error
- func CreateServiceAccount(namespace, name string) error
- func CreateTemporaryFile(filePattern, fileContent string) (string, error)
- func CreateTemporaryFolder(folderPrefix string) (string, error)
- func CreateTrigger(namespace, name, brokerName, serviceName string) error
- func DeleteFile(folder, fileName string) error
- func DeleteFolder(folder string) error
- func DeleteKogitoOperatorCatalogSource() error
- func DeleteNamespace(namespace string) error
- func DeleteObject(o client.Object) error
- func DeleteSubscription(subscription *olmapiv1alpha1.Subscription) error
- func DeployBroker(namespace, name string) error
- func DeployGrafanaInstance(namespace, labelName, labelValue string) error
- func DeployInfinispanInstance(namespace string, infinispan *infinispan.Infinispan) error
- func DeployKafkaInstance(namespace string, kafka *v1beta2.Kafka) error
- func DeployKafkaTopic(namespace, kafkaTopicName, kafkaInstanceName string) error
- func DeployKeycloakClient(namespace, clientName string) error
- func DeployKeycloakInstance(namespace string) error
- func DeployKeycloakRealm(namespace, realmName string) error
- func DeployKeycloakUser(namespace, userName, password string) error
- func DeployKogitoBuild(namespace string, installerType InstallerType, ...) error
- func DeployMongoDBInstance(namespace string, instance *mongodb.MongoDBCommunity) error
- func DeployPrometheusInstance(namespace, labelName, labelValue string) error
- func DeployRuntimeService(namespace string, installerType InstallerType, ...) error
- func DeployService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType) error
- func DoesHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)
- func DoesNotHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)
- func ExecuteCliCommand(namespace string, args ...string) (string, error)
- func ExecuteCliCommandInNamespace(namespace string, args ...string) (string, error)
- func ExecuteGraphQLRequestWithLogging(namespace, uri, path, query, bearerToken string, response interface{}) error
- func ExecuteGraphQLRequestWithLoggingOption(namespace, uri, path, query, bearerToken string, response interface{}, ...) error
- func ExecuteHTTPRequest(namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)
- func ExecuteHTTPRequestC(client *http.Client, namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)
- func ExecuteHTTPRequestWithStringResponse(namespace string, requestInfo HTTPRequestInfo) (string, error)
- func ExecuteHTTPRequestWithUnmarshalledResponse(namespace string, requestInfo HTTPRequestInfo, response interface{}) error
- func ExposeServiceOnKubernetes(namespace, serviceName string) error
- func FlushAllRemainingLoggers()
- func FlushLogger(namespace string) error
- func GenerateNamespaceName(prefix string) string
- func GetAccessTokenFromKeycloak(namespace, server, userName, password, realm, clientName string) (string, error)
- func GetActiveReplicaSetByDeployment(namespace string, dName string) (*apps.ReplicaSet, error)
- func GetClusterOperatorNamespace() string
- func GetClusterRole(name string) (*rbac.ClusterRole, error)
- func GetClusterRoleBinding(name string) (*rbac.ClusterRoleBinding, error)
- func GetClusterWideSubscription(operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)
- func GetContainerLog(namespace, podName, containerName string) (string, error)
- func GetDeployment(namespace, deploymentName string) (*apps.Deployment, error)
- func GetDeploymentConfig(namespace, dcName string) (*ocapps.DeploymentConfig, error)
- func GetDeploymentWaiting(namespace, deploymentName string, timeoutInMin int) (deployment *apps.Deployment, err error)
- func GetImageStreams(namespace string) (*imagev1.ImageStreamList, error)
- func GetInfinispanStub(namespace, name, secretName string) *infinispan.Infinispan
- func GetIngressURI(namespace, serviceName string) (string, error)
- func GetKafkaInstance(namespace, kafkaInstanceName string) (*v1beta2.Kafka, error)
- func GetKafkaPods(namespace, kafkaInstanceName string) (*v1.PodList, error)
- func GetKogitoBuild(namespace, buildName string) (api.KogitoBuildInterface, error)
- func GetKogitoBuildRuntimeImage(native bool) string
- func GetKogitoBuildS2IImage() string
- func GetKogitoBuildStub(namespace, runtimeType, name string) api.KogitoBuildInterface
- func GetKogitoDataIndexResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoExplainabilityResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoInfraResource(namespace, name string) (api.KogitoInfraInterface, error)
- func GetKogitoInfraResourceStub(namespace, name, targetResourceType, targetResourceName string) (api.KogitoInfraInterface, error)
- func GetKogitoJobsService(namespace string) (*v1beta1.KogitoSupportingService, error)
- func GetKogitoJobsServiceResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoManagementConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoRuntimeStub(namespace, runtimeType, name, imageTag string) api.KogitoRuntimeInterface
- func GetKogitoTaskConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoTrustyResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKogitoTrustyUIResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
- func GetKubernetesDurationFromTimeInMin(timeoutInMin int) time.Duration
- func GetLogFolder() string
- func GetMessagesOnTopic(namespace, kafkaInstanceName, topic string) ([]string, error)
- func GetMongoDBSecret(namespace, secretName, password string) *corev1.Secret
- func GetMongoDBStub(openshift bool, namespace, name string, users []MongoDBUserCred) *mongodb.MongoDBCommunity
- func GetNamespacedLogFolder(namespace string) string
- func GetNamespacesInHistory() []string
- func GetObjectWithKey(key types.NamespacedName, o client.Object) (exists bool, err error)
- func GetObjectsInNamespace(namespace string, list client.ObjectList) error
- func GetOpenshiftDurationFromTimeInMin(timeoutInMin int) time.Duration
- func GetPods(namespace string) (*corev1.PodList, error)
- func GetPodsByDeployment(namespace string, dName string) (pods []corev1.Pod, err error)
- func GetPodsByDeploymentConfig(namespace string, dcName string) (*corev1.PodList, error)
- func GetPodsWithLabels(namespace string, labels map[string]string) (*corev1.PodList, error)
- func GetProcessInstances(namespace, routeURI, processName string) (foundProcessInstances []map[string]interface{}, err error)
- func GetRoute(namespace, routeName string) (*routev1.Route, error)
- func GetRouteURI(namespace, serviceName string) (string, error)
- func GetRunningInfinispanPodLabels(crName string) map[string]string
- func GetService(namespace, name string) (*corev1.Service, error)
- func GetStatefulSet(namespace, name string) (*apps.StatefulSet, error)
- func GetSubscription(namespace, operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)
- func InitKubeClient(scheme *runtime.Scheme) error
- func InstallClusterWideOperator(subscriptionName, channel, startingCSV string, catalog OperatorCatalog) error
- func InstallKogitoDataIndexService(namespace string, installerType InstallerType, ...) error
- func InstallKogitoExplainabilityService(namespace string, installerType InstallerType, ...) error
- func InstallKogitoInfraComponent(namespace string, installerType InstallerType, infra api.KogitoInfraInterface) error
- func InstallKogitoJobsService(installerType InstallerType, jobsService *bddtypes.KogitoServiceHolder) error
- func InstallKogitoManagementConsole(installerType InstallerType, managementConsole *bddtypes.KogitoServiceHolder) error
- func InstallKogitoTaskConsole(installerType InstallerType, taskConsole *bddtypes.KogitoServiceHolder) error
- func InstallKogitoTrustyService(namespace string, installerType InstallerType, ...) error
- func InstallKogitoTrustyUI(installerType InstallerType, trustyUI *bddtypes.KogitoServiceHolder) error
- func InstallOperator(namespace, subscriptionName, channel, startingCSV string, ...) error
- func InstallService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType, ...) error
- func IsConfigMapExist(key types.NamespacedName) (bool, error)
- func IsCrdAvailable(crdName string) (bool, error)
- func IsGraphQLRequestSuccessful(namespace, uri, path, query, bearerToken string, response interface{}) (bool, error)
- func IsHTTPRequestFailed(namespace string, requestInfo HTTPRequestInfo) (bool, error)
- func IsHTTPRequestForbidden(namespace string, requestInfo HTTPRequestInfo) (bool, error)
- func IsHTTPRequestSuccessful(namespace string, requestInfo HTTPRequestInfo) (bool, error)
- func IsHTTPResponseArraySize(namespace string, requestInfo HTTPRequestInfo, arraySize int) (bool, error)
- func IsInfinispanAvailable(namespace string) bool
- func IsKogitoOperatorRunning(namespace string) (bool, error)
- func IsMongoDBAvailable(namespace string) bool
- func IsNamespace(namespace string) (bool, error)
- func IsOpenshift() bool
- func IsOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog) (bool, error)
- func IsPodRunning(pod *corev1.Pod) bool
- func IsPodStatusConditionReady(pod *corev1.Pod) bool
- func KogitoOperatorExists(namespace string) (bool, error)
- func LoadResource(namespace, uri string, resourceRef client.Object, ...) error
- func LogKubernetesObjects(namespace string, runtimeObjects ...client.ObjectList) error
- func NewImageOrDefault(fullImage string, defaultImageName string) string
- func NewKogitoServiceSpec(replicas int32, fullImage string, defaultImageName string) v1beta1.KogitoServiceSpec
- func NewObjectMetadata(namespace string, name string) metav1.ObjectMeta
- func OnKogitoServiceDeployed(namespace string, service api.KogitoService) error
- func OnNamespacePostCreated(namespace string)
- func OnNamespacePostDeleted(namespace string)
- func OperateOnNamespaceIfExists(namespace string, operate func(namespace string) error) error
- func OperatorExistsUsingSubscription(namespace, operatorPackageName, operatorSource string) (bool, error)
- func PrintDataMap(keys []string, dataMaps []map[string]string, writer io.StringWriter) error
- func ReadFromURI(uri string) (string, error)
- func RemoveKogitoOperatorDeployment(namespace string) error
- func RenameLogFolder(namespace string, newLogFolderNames ...string) error
- func ReportPerformanceMetric(metric, value, unit string)
- func RetrieveKeycloakEndpointURI(namespace string) (string, error)
- func ScaleKafkaInstanceDown(namespace, kafkaInstanceName string) error
- func SetInfinispanReplicas(namespace, name string, nbPods int) error
- func SetKogitoJobsServiceReplicas(namespace string, nbPods int32) error
- func SetKogitoRuntimeReplicas(namespace, name string, nbPods int) error
- func SetMongoDBReplicas(namespace, name string, nbPods int) error
- func SetPostgresqlReplicas(namespace, name string, nbPods int) error
- func SetupKogitoBuildImageStreams(kogitoBuild api.KogitoBuildInterface)
- func StartPodLogCollector(namespace string) error
- func StartProcess(namespace, routeURI, processName, bodyFormat, bodyContent string) (err error)
- func StopPodLogCollector(namespace string) error
- func SubscriptionResolutionFails(namespace, operatorPackageName, operatorSource string) (bool, error)
- func ToResourceRequirements(requests string, limits string) corev1.ResourceRequirements
- func UpdateObject(o client.Object) error
- func WaitAndRetrieveEndpointURI(namespace, serviceName string) (string, error)
- func WaitFor(namespace, display string, timeout time.Duration, ...) error
- func WaitForAllPodsByDeploymentConfigToContainTextInLog(namespace, dcName, logText string, timeoutInMin int) error
- func WaitForAllPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error
- func WaitForAnyPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error
- func WaitForBrokerResource(namespace, name string, timeoutInMin int) error
- func WaitForBuildComplete(namespace, buildName string, timeoutInMin int) error
- func WaitForBuildConfigCreated(namespace, buildConfigName string, timeoutInMin int) error
- func WaitForBuildConfigCreatedWithWebhooks(namespace, buildConfigName string, ...) error
- func WaitForBuildConfigToHaveResources(namespace, buildConfigName string, expected v1.ResourceRequirements, ...) error
- func WaitForClusterWideOperatorRunning(operatorPackageName string, catalog OperatorCatalog, timeoutInMin int) error
- func WaitForDeploymentConfigRunning(namespace, dcName string, podNb int, timeoutInMin int) error
- func WaitForDeploymentRunning(namespace, dName string, podNb int, timeoutInMin int) error
- func WaitForFailedHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
- func WaitForFailingGraphQLRequest(namespace, uri, path, query string, timeoutInMin int) error
- func WaitForFailingGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int) error
- func WaitForForbiddenHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
- func WaitForInfinispanPodsToBeRunningWithConfig(namespace string, expectedConfig infinispan.InfinispanContainerSpec, ...) error
- func WaitForKogitoDataIndexService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoExplainabilityService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoInfraResource(namespace, name string, timeoutInMin int, ...) error
- func WaitForKogitoJobsService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoJobsServiceLogContainsTextWithinMinutes(namespace, logText string, timeoutInMin int) error
- func WaitForKogitoManagementConsoleService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoOperatorCatalogSourceReady() error
- func WaitForKogitoOperatorRunning(namespace string) error
- func WaitForKogitoTaskConsoleService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoTrustyService(namespace string, replicas int, timeoutInMin int) error
- func WaitForKogitoTrustyUIService(namespace string, replicas int, timeoutInMin int) error
- func WaitForMessagesOnTopic(namespace, kafkaInstanceName, topic string, numberOfMsg int, timeoutInMin int) error
- func WaitForMongoDBOperatorRunning(namespace string) error
- func WaitForOnKubernetes(namespace, display string, timeoutInMin int, condition func() (bool, error)) error
- func WaitForOnOpenshift(namespace, display string, timeoutInMin int, condition func() (bool, error), ...) error
- func WaitForOperatorGroup(namespace, operatorGroupName string) error
- func WaitForOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog, ...) error
- func WaitForPodsByDeploymentConfigToHaveResources(namespace, dcName string, expected v1.ResourceRequirements, timeoutInMin int) error
- func WaitForPodsByDeploymentToHaveResources(namespace, dName string, expected v1.ResourceRequirements, timeoutInMin int) error
- func WaitForPodsInNamespace(namespace string, numberOfPods, timeoutInMin int) error
- func WaitForPodsWithLabel(namespace, labelName, labelValue string, numberOfPods, timeoutInMin int) error
- func WaitForPodsWithLabels(namespace string, labels map[string]string, numberOfPods, timeoutInMin int) error
- func WaitForPostgresqlInstance(namespace string, nbPods, timeoutInMin int) error
- func WaitForRoute(namespace, routeName string, timeoutInMin int) error
- func WaitForService(namespace string, serviceName string, replicas int, timeoutInMin int) error
- func WaitForSuccessfulGraphQLRequest(namespace, uri, path, query string, timeoutInMin int, response interface{}, ...) error
- func WaitForSuccessfulGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int, ...) error
- func WaitForSuccessfulGraphQLRequestUsingPagination(namespace, uri, path, query string, timeoutInMin, pageSize, totalSize int, ...) error
- func WaitForSuccessfulHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
- func WaitForTrigger(namespace, name string, timeoutInMin int) error
- type Command
- type ContainerEngine
- type DecisionsResponse
- type HTTPRequestInfo
- type HTTPRequestResult
- type InstallerType
- type KogitoApplicationDockerfileProvider
- type Logger
- type MavenCommand
- type MongoDBUserCred
- type OperatorCatalog
- type Opts
- type RetryOption
- type Salience
- type Task
Constants ¶
const ( // OpenShiftCatalogNamespace is the namespace for clusterwide installations on Openshift OpenShiftCatalogNamespace = "openshift-marketplace" // KubernetesCatalogNamespace is the namespace for clusterwide installations on Kubernetes KubernetesCatalogNamespace = "olm" )
Variables ¶
var ( // KogitoOperatorMongoDBDependency is the MongoDB identifier for installation KogitoOperatorMongoDBDependency = infrastructure.MongoDBKind )
Functions ¶
func AddLineToFile ¶
AddLineToFile adds the given line to the given file
func AppendImageDefaultValues ¶
AppendImageDefaultValues appends the image default values if none existing
func BumpEvents ¶
BumpEvents will bump all events into events.log file
func CheckCliBinaryExist ¶
CheckCliBinaryExist checks if the CLI binary does exist
func CheckPodHasImagePullSecretWithPrefix ¶
CheckPodHasImagePullSecretWithPrefix checks that a pod has an image pull secret starting with the given prefix
func CheckPodsAreReady ¶
CheckPodsAreReady returns true if all pods are ready
func CheckPodsByDeploymentConfigInError ¶
CheckPodsByDeploymentConfigInError returns a function that checks the pods error state.
func CheckPodsByDeploymentInError ¶
CheckPodsByDeploymentInError returns a function that checks the pods error state.
func CheckPodsInNamespaceInError ¶
CheckPodsInNamespaceInError returns a function that checks the pods error state.
func CheckPodsWithLabelInError ¶
CheckPodsWithLabelInError returns a function that checks the pods error state.
func CheckPodsWithLabelsInError ¶
CheckPodsWithLabelsInError returns a function that checks the pods error state.
func ClearNamespaceHistory ¶
func ClearNamespaceHistory()
ClearNamespaceHistory clears all the namespace history content.
func CompleteTask ¶
func CompleteTask(namespace, routeURI, processName, processInstanceID, taskName, taskID, bodyFormat, bodyContent string) (err error)
CompleteTask completes task
func CompleteTaskByUser ¶
func CompleteTaskByUser(namespace, routeURI, processName, processInstanceID, taskName, taskID, user, bodyFormat, bodyContent string) (err error)
CompleteTaskByUser completes task by user
func ConstructDefaultImageFullTag ¶
ConstructDefaultImageFullTag construct the full image tag (adding default registry and tag)
func CreateConfigMap ¶
func CreateConfigMap(namespace, name string, data map[string]string, binaryData map[string][]byte) error
CreateConfigMap creates ConfigMap
func CreateFile ¶
CreateFile Creates file in folder with supplied content
func CreateFolder ¶
CreateFolder creates a folder and all its parents if not exist
func CreateInfinispanSecret ¶
CreateInfinispanSecret creates a new secret for Infinispan instance
func CreateInsecureImageStream ¶
CreateInsecureImageStream creates insecure ImageStream pointing to the passed image tag
func CreateKogitoOperatorCatalogSource ¶
func CreateKogitoOperatorCatalogSource() (*olmapiv1alpha1.CatalogSource, error)
CreateKogitoOperatorCatalogSource create a Kogito operator catalog Source
func CreateMongoDBSecret ¶
CreateMongoDBSecret creates a new secret for MongoDB instance
func CreateNamespace ¶
CreateNamespace creates a new namespace
func CreateNamespaceIfNotExists ¶
CreateNamespaceIfNotExists creates a new namespace if not exists, returns true if namespaces already existed
func CreateNamespacedSubscriptionIfNotExist ¶
func CreateNamespacedSubscriptionIfNotExist(namespace string, subscriptionName string, operatorName string, catalog OperatorCatalog, channel, startingCSV string) (*olmapiv1alpha1.Subscription, error)
CreateNamespacedSubscriptionIfNotExist create a namespaced subscription if not exists
func CreateOperatorGroupIfNotExists ¶
func CreateOperatorGroupIfNotExists(namespace, operatorGroupName string) (*olmapiv1.OperatorGroup, error)
CreateOperatorGroupIfNotExists creates an operator group if no exist
func CreatePostgresqlInstance ¶
func CreatePostgresqlInstance(namespace, name string, nbPods int, username, password, databaseName string) error
CreatePostgresqlInstance creates a new Postgresql instance
func CreateSecret ¶
CreateSecret creates a new secret
func CreateServiceAccount ¶
CreateServiceAccount creates ServiceAccount
func CreateTemporaryFile ¶
CreateTemporaryFile Creates file in default directory for temporary files with supplied content
func CreateTemporaryFolder ¶
CreateTemporaryFolder creates a folder in default directory for temporary files
func CreateTrigger ¶
CreateTrigger creates Knative Trigger
func DeleteFolder ¶
DeleteFolder deletes a folder and all its subfolders
func DeleteKogitoOperatorCatalogSource ¶
func DeleteKogitoOperatorCatalogSource() error
DeleteKogitoOperatorCatalogSource delete a Kogito operator catalog Source
func DeleteNamespace ¶
DeleteNamespace deletes a namespace
func DeleteSubscription ¶
func DeleteSubscription(subscription *olmapiv1alpha1.Subscription) error
DeleteSubscription deletes Subscription and related objects
func DeployBroker ¶
DeployBroker deploys Knative Broker
func DeployGrafanaInstance ¶
DeployGrafanaInstance deploys an instance of Grafana watching for label with specific name and value
func DeployInfinispanInstance ¶
func DeployInfinispanInstance(namespace string, infinispan *infinispan.Infinispan) error
DeployInfinispanInstance deploys an instance of Infinispan
func DeployKafkaInstance ¶
DeployKafkaInstance deploys an instance of Kafka
func DeployKafkaTopic ¶
DeployKafkaTopic deploys a Kafka topic
func DeployKeycloakClient ¶
DeployKeycloakClient deploys a client configuration of Keycloak
func DeployKeycloakInstance ¶
DeployKeycloakInstance deploys an instance of Keycloak
func DeployKeycloakRealm ¶
DeployKeycloakRealm deploys a realm configuration of Keycloak
func DeployKeycloakUser ¶
DeployKeycloakUser deploys a realm configuration of Keycloak
func DeployKogitoBuild ¶
func DeployKogitoBuild(namespace string, installerType InstallerType, buildHolder *bddtypes.KogitoBuildHolder) error
DeployKogitoBuild deploy a KogitoBuild
func DeployMongoDBInstance ¶
func DeployMongoDBInstance(namespace string, instance *mongodb.MongoDBCommunity) error
DeployMongoDBInstance deploys an instance of Mongo DB
func DeployPrometheusInstance ¶
DeployPrometheusInstance deploys an instance of Prometheus
func DeployRuntimeService ¶
func DeployRuntimeService(namespace string, installerType InstallerType, serviceHolder *bddtypes.KogitoServiceHolder) error
DeployRuntimeService deploy a Kogito service
func DeployService ¶
func DeployService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType) error
DeployService deploy the Kogito Service component
func DoesHTTPResponseContain ¶
func DoesHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)
DoesHTTPResponseContain checks whether the response of an http request contains a certain string
func DoesNotHTTPResponseContain ¶
func DoesNotHTTPResponseContain(namespace string, requestInfo HTTPRequestInfo, responseContent string) (bool, error)
DoesNotHTTPResponseContain checks whether the response of an http request does not contain a certain string
func ExecuteCliCommand ¶
ExecuteCliCommand executes a kogito cli command for a given namespace
func ExecuteCliCommandInNamespace ¶
ExecuteCliCommandInNamespace executes a kogito cli command in a specific namespace
func ExecuteGraphQLRequestWithLogging ¶
func ExecuteGraphQLRequestWithLogging(namespace, uri, path, query, bearerToken string, response interface{}) error
ExecuteGraphQLRequestWithLogging executes a GraphQL query
func ExecuteGraphQLRequestWithLoggingOption ¶
func ExecuteGraphQLRequestWithLoggingOption(namespace, uri, path, query, bearerToken string, response interface{}, logResponse bool) error
ExecuteGraphQLRequestWithLoggingOption executes a GraphQL query with possibility of logging each request
func ExecuteHTTPRequest ¶
func ExecuteHTTPRequest(namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)
ExecuteHTTPRequest executes an HTTP request
func ExecuteHTTPRequestC ¶
func ExecuteHTTPRequestC(client *http.Client, namespace string, requestInfo HTTPRequestInfo) (*http.Response, error)
ExecuteHTTPRequestC executes an HTTP request using a given client
func ExecuteHTTPRequestWithStringResponse ¶
func ExecuteHTTPRequestWithStringResponse(namespace string, requestInfo HTTPRequestInfo) (string, error)
ExecuteHTTPRequestWithStringResponse executes an HTTP request and returns a string response in case there is no error
func ExecuteHTTPRequestWithUnmarshalledResponse ¶
func ExecuteHTTPRequestWithUnmarshalledResponse(namespace string, requestInfo HTTPRequestInfo, response interface{}) error
ExecuteHTTPRequestWithUnmarshalledResponse executes an HTTP request and returns response unmarshalled into specific structure in case there is no error
func ExposeServiceOnKubernetes ¶
ExposeServiceOnKubernetes adds ingress CR to expose a service
func FlushAllRemainingLoggers ¶
func FlushAllRemainingLoggers()
FlushAllRemainingLoggers flushes all remaining loggers
func GenerateNamespaceName ¶
GenerateNamespaceName generates a namespace name, taking configuration into account (local or not)
func GetAccessTokenFromKeycloak ¶
func GetAccessTokenFromKeycloak(namespace, server, userName, password, realm, clientName string) (string, error)
GetAccessTokenFromKeycloak gets the access token for a user
func GetActiveReplicaSetByDeployment ¶
func GetActiveReplicaSetByDeployment(namespace string, dName string) (*apps.ReplicaSet, error)
GetActiveReplicaSetByDeployment retrieves active ReplicaSet belonging to a Deployment
func GetClusterOperatorNamespace ¶
func GetClusterOperatorNamespace() string
GetClusterOperatorNamespace returns namespace used to deploy cluster wide operators
func GetClusterRole ¶
func GetClusterRole(name string) (*rbac.ClusterRole, error)
GetClusterRole return ClusterRole based on name
func GetClusterRoleBinding ¶
func GetClusterRoleBinding(name string) (*rbac.ClusterRoleBinding, error)
GetClusterRoleBinding return ClusterRoleBinding based on name
func GetClusterWideSubscription ¶
func GetClusterWideSubscription(operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)
GetClusterWideSubscription returns cluster wide subscription
func GetContainerLog ¶
GetContainerLog exported for Zookeeper workaround, can be unexported once https://github.com/strimzi/strimzi-kafka-operator/issues/3092 is fixed
func GetDeployment ¶
func GetDeployment(namespace, deploymentName string) (*apps.Deployment, error)
GetDeployment retrieves deployment with specified name in namespace
func GetDeploymentConfig ¶
func GetDeploymentConfig(namespace, dcName string) (*ocapps.DeploymentConfig, error)
GetDeploymentConfig retrieves a deployment config
func GetDeploymentWaiting ¶
func GetDeploymentWaiting(namespace, deploymentName string, timeoutInMin int) (deployment *apps.Deployment, err error)
GetDeploymentWaiting waits for a deployment to be available, then returns it
func GetImageStreams ¶
func GetImageStreams(namespace string) (*imagev1.ImageStreamList, error)
GetImageStreams returns ImageStreams in the namespace
func GetInfinispanStub ¶
func GetInfinispanStub(namespace, name, secretName string) *infinispan.Infinispan
GetInfinispanStub returns the preconfigured Infinispan stub with set namespace, name and secretName
func GetIngressURI ¶
GetIngressURI returns the ingress URI
func GetKafkaInstance ¶
GetKafkaInstance retrieves the Kafka instance
func GetKafkaPods ¶
GetKafkaPods return the Kafka pods (suffixed with `-kafka`)
func GetKogitoBuild ¶
func GetKogitoBuild(namespace, buildName string) (api.KogitoBuildInterface, error)
GetKogitoBuild returns the KogitoBuild type
func GetKogitoBuildRuntimeImage ¶
GetKogitoBuildRuntimeImage returns the Runtime image tag
func GetKogitoBuildS2IImage ¶
func GetKogitoBuildS2IImage() string
GetKogitoBuildS2IImage returns the S2I builder image tag
func GetKogitoBuildStub ¶
func GetKogitoBuildStub(namespace, runtimeType, name string) api.KogitoBuildInterface
GetKogitoBuildStub Get basic KogitoBuild stub with all needed fields initialized
func GetKogitoDataIndexResourceStub ¶
func GetKogitoDataIndexResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoDataIndexResourceStub Get basic KogitoDataIndex stub with all needed fields initialized
func GetKogitoExplainabilityResourceStub ¶
func GetKogitoExplainabilityResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoExplainabilityResourceStub Get basic KogitoExplainability stub with all needed fields initialized
func GetKogitoInfraResource ¶
func GetKogitoInfraResource(namespace, name string) (api.KogitoInfraInterface, error)
GetKogitoInfraResource retrieves the KogitoInfra resource
func GetKogitoInfraResourceStub ¶
func GetKogitoInfraResourceStub(namespace, name, targetResourceType, targetResourceName string) (api.KogitoInfraInterface, error)
GetKogitoInfraResourceStub Get basic KogitoInfra stub with all needed fields initialized
func GetKogitoJobsService ¶
func GetKogitoJobsService(namespace string) (*v1beta1.KogitoSupportingService, error)
GetKogitoJobsService retrieves the running jobs service
func GetKogitoJobsServiceResourceStub ¶
func GetKogitoJobsServiceResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoJobsServiceResourceStub Get basic KogitoJobsService stub with all needed fields initialized
func GetKogitoManagementConsoleResourceStub ¶
func GetKogitoManagementConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoManagementConsoleResourceStub Get basic KogitoManagementConsole stub with all needed fields initialized
func GetKogitoRuntimeStub ¶
func GetKogitoRuntimeStub(namespace, runtimeType, name, imageTag string) api.KogitoRuntimeInterface
GetKogitoRuntimeStub Get basic KogitoRuntime stub with all needed fields initialized
func GetKogitoTaskConsoleResourceStub ¶
func GetKogitoTaskConsoleResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoTaskConsoleResourceStub Get basic KogitoTaskConsole stub with all needed fields initialized
func GetKogitoTrustyResourceStub ¶
func GetKogitoTrustyResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoTrustyResourceStub Get basic KogitoTrusty stub with all needed fields initialized
func GetKogitoTrustyUIResourceStub ¶
func GetKogitoTrustyUIResourceStub(namespace string, replicas int) *v1beta1.KogitoSupportingService
GetKogitoTrustyUIResourceStub Get basic KogitoTrustyUI stub with all needed fields initialized
func GetKubernetesDurationFromTimeInMin ¶
GetKubernetesDurationFromTimeInMin will calculate the time depending on the configured cluster load factor
func GetMessagesOnTopic ¶
GetMessagesOnTopic gets all messages for a topic
func GetMongoDBSecret ¶
GetMongoDBSecret returns a MongoDB secret structure
func GetMongoDBStub ¶
func GetMongoDBStub(openshift bool, namespace, name string, users []MongoDBUserCred) *mongodb.MongoDBCommunity
GetMongoDBStub returns the preconfigured MongoDB stub with set namespace, name and secretName
func GetNamespacedLogFolder ¶
GetNamespacedLogFolder retrieves the log folder for a specific namespace
func GetNamespacesInHistory ¶
func GetNamespacesInHistory() []string
GetNamespacesInHistory retrieves all the namespaces in the history.
func GetObjectWithKey ¶
GetObjectWithKey returns object matching provided key
func GetObjectsInNamespace ¶
func GetObjectsInNamespace(namespace string, list client.ObjectList) error
GetObjectsInNamespace returns list of objects in specific namespace based on type
func GetOpenshiftDurationFromTimeInMin ¶
GetOpenshiftDurationFromTimeInMin will calculate the time depending on the configured cluster load factor
func GetPodsByDeployment ¶
GetPodsByDeployment retrieves pods belonging to a Deployment
func GetPodsByDeploymentConfig ¶
GetPodsByDeploymentConfig retrieves pods with a deploymentconfig label set to <dcName>
func GetPodsWithLabels ¶
GetPodsWithLabels retrieves pods based on label name and value
func GetProcessInstances ¶
func GetProcessInstances(namespace, routeURI, processName string) (foundProcessInstances []map[string]interface{}, err error)
GetProcessInstances retrieves process instance of process name
func GetRouteURI ¶
GetRouteURI retrieves a route URI
func GetRunningInfinispanPodLabels ¶
GetRunningInfinispanPodLabels returns the labels set to infinispan pod instances
func GetService ¶
GetService return Service based on namespace and name
func GetStatefulSet ¶
func GetStatefulSet(namespace, name string) (*apps.StatefulSet, error)
GetStatefulSet returns the given StatefulSet
func GetSubscription ¶
func GetSubscription(namespace, operatorPackageName string, catalog OperatorCatalog) (*olmapiv1alpha1.Subscription, error)
GetSubscription returns subscription
func InitKubeClient ¶
InitKubeClient initializes the Kubernetes Client
func InstallClusterWideOperator ¶
func InstallClusterWideOperator(subscriptionName, channel, startingCSV string, catalog OperatorCatalog) error
InstallClusterWideOperator installs an operator for all namespaces via subscrition
func InstallKogitoDataIndexService ¶
func InstallKogitoDataIndexService(namespace string, installerType InstallerType, dataIndex *bddtypes.KogitoServiceHolder) error
InstallKogitoDataIndexService install the Kogito Data Index service
func InstallKogitoExplainabilityService ¶
func InstallKogitoExplainabilityService(namespace string, installerType InstallerType, explainability *bddtypes.KogitoServiceHolder) error
InstallKogitoExplainabilityService install the Kogito Explainability service
func InstallKogitoInfraComponent ¶
func InstallKogitoInfraComponent(namespace string, installerType InstallerType, infra api.KogitoInfraInterface) error
InstallKogitoInfraComponent installs the desired component with the given installer type
func InstallKogitoJobsService ¶
func InstallKogitoJobsService(installerType InstallerType, jobsService *bddtypes.KogitoServiceHolder) error
InstallKogitoJobsService install the Kogito Jobs Service component
func InstallKogitoManagementConsole ¶
func InstallKogitoManagementConsole(installerType InstallerType, managementConsole *bddtypes.KogitoServiceHolder) error
InstallKogitoManagementConsole install the Kogito Management Console component
func InstallKogitoTaskConsole ¶
func InstallKogitoTaskConsole(installerType InstallerType, taskConsole *bddtypes.KogitoServiceHolder) error
InstallKogitoTaskConsole install the Kogito Task Console component
func InstallKogitoTrustyService ¶
func InstallKogitoTrustyService(namespace string, installerType InstallerType, trusty *bddtypes.KogitoServiceHolder) error
InstallKogitoTrustyService install the Kogito Trusty service
func InstallKogitoTrustyUI ¶
func InstallKogitoTrustyUI(installerType InstallerType, trustyUI *bddtypes.KogitoServiceHolder) error
InstallKogitoTrustyUI install the Kogito Management Console component
func InstallOperator ¶
func InstallOperator(namespace, subscriptionName, channel, startingCSV string, catalog OperatorCatalog) error
InstallOperator installs an operator via subscrition
func InstallService ¶
func InstallService(serviceHolder *bddtypes.KogitoServiceHolder, installerType InstallerType, cliDeploymentName string) error
InstallService install the Kogito Service component
func IsConfigMapExist ¶
func IsConfigMapExist(key types.NamespacedName) (bool, error)
IsConfigMapExist returns true if ConfigMap exists
func IsCrdAvailable ¶
IsCrdAvailable returns whether the crd is available on cluster
func IsGraphQLRequestSuccessful ¶
func IsGraphQLRequestSuccessful(namespace, uri, path, query, bearerToken string, response interface{}) (bool, error)
IsGraphQLRequestSuccessful makes and checks whether a GraphQL query is successful
func IsHTTPRequestFailed ¶
func IsHTTPRequestFailed(namespace string, requestInfo HTTPRequestInfo) (bool, error)
IsHTTPRequestFailed makes and checks whether an http request fails
func IsHTTPRequestForbidden ¶
func IsHTTPRequestForbidden(namespace string, requestInfo HTTPRequestInfo) (bool, error)
IsHTTPRequestForbidden makes and checks whether an http request is unauthorized
func IsHTTPRequestSuccessful ¶
func IsHTTPRequestSuccessful(namespace string, requestInfo HTTPRequestInfo) (bool, error)
IsHTTPRequestSuccessful makes and checks whether an http request is successful
func IsHTTPResponseArraySize ¶
func IsHTTPResponseArraySize(namespace string, requestInfo HTTPRequestInfo, arraySize int) (bool, error)
IsHTTPResponseArraySize makes and checks whether an http request returns an array of a specific size
func IsInfinispanAvailable ¶
IsInfinispanAvailable checks if Infinispan CRD is available in the cluster
func IsKogitoOperatorRunning ¶
IsKogitoOperatorRunning returns whether Kogito operator is running
func IsMongoDBAvailable ¶
IsMongoDBAvailable checks if MongoDB CRD is available in the cluster
func IsNamespace ¶
IsNamespace checks whether a namespace exists
func IsOpenshift ¶
func IsOpenshift() bool
IsOpenshift returns whether the cluster is running on Openshift
func IsOperatorRunning ¶
func IsOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog) (bool, error)
IsOperatorRunning checks whether an operator is running
func IsPodRunning ¶
IsPodRunning returns true if pod is running
func IsPodStatusConditionReady ¶
IsPodStatusConditionReady returns true if all pod's containers are ready (really running)
func KogitoOperatorExists ¶
KogitoOperatorExists returns whether Kogito operator exists and is running. If it is existing but not running, it returns true and an error
func LoadResource ¶
func LoadResource(namespace, uri string, resourceRef client.Object, beforeCreate func(object interface{})) error
LoadResource loads the resource from provided URI and creates it in the cluster
func LogKubernetesObjects ¶
func LogKubernetesObjects(namespace string, runtimeObjects ...client.ObjectList) error
LogKubernetesObjects log Kubernetes objects for test analysis
func NewImageOrDefault ¶
NewImageOrDefault Returns Image parsed from provided image tag or created from configuration options
func NewKogitoServiceSpec ¶
func NewKogitoServiceSpec(replicas int32, fullImage string, defaultImageName string) v1beta1.KogitoServiceSpec
NewKogitoServiceSpec creates a new Kogito Service Spec object.
func NewObjectMetadata ¶
func NewObjectMetadata(namespace string, name string) metav1.ObjectMeta
NewObjectMetadata creates a new Object Metadata object.
func OnKogitoServiceDeployed ¶
func OnKogitoServiceDeployed(namespace string, service api.KogitoService) error
OnKogitoServiceDeployed is called when a service deployed.
func OnNamespacePostCreated ¶
func OnNamespacePostCreated(namespace string)
OnNamespacePostCreated hook when a namespace has been created
func OnNamespacePostDeleted ¶
func OnNamespacePostDeleted(namespace string)
OnNamespacePostDeleted hook when a namespace has been deleted
func OperateOnNamespaceIfExists ¶
OperateOnNamespaceIfExists do some operations on the namespace if that one exists
func OperatorExistsUsingSubscription ¶
func OperatorExistsUsingSubscription(namespace, operatorPackageName, operatorSource string) (bool, error)
OperatorExistsUsingSubscription returns whether operator exists and is running. If it is existing but not running, it returns true and an error For this check informations from subscription are used.
func PrintDataMap ¶
PrintDataMap prints a formatted dataMap using the given writer
func ReadFromURI ¶
ReadFromURI reads string content from given URI (URL or Filesystem)
func RemoveKogitoOperatorDeployment ¶
RemoveKogitoOperatorDeployment remove the Kogito operator deployment in the given namespace
func RenameLogFolder ¶
RenameLogFolder changes the name of the log folder for a specific namespace
func ReportPerformanceMetric ¶
func ReportPerformanceMetric(metric, value, unit string)
ReportPerformanceMetric reports a new metric with its value and unit to a results file. If the file does not exist, it will be created. It depends on the existence of the log folder which is created by the framework before the tests are run.
func RetrieveKeycloakEndpointURI ¶
RetrieveKeycloakEndpointURI retrieves the keycloak endpoint
func ScaleKafkaInstanceDown ¶
ScaleKafkaInstanceDown scales a Kafka instance down by killing its pod temporarily
func SetInfinispanReplicas ¶
SetInfinispanReplicas sets the number of replicas for an Infinispan instance
func SetKogitoJobsServiceReplicas ¶
SetKogitoJobsServiceReplicas sets the number of replicas for the Kogito Jobs Service
func SetKogitoRuntimeReplicas ¶
SetKogitoRuntimeReplicas sets the number of replicas for a Kogito application
func SetMongoDBReplicas ¶
SetMongoDBReplicas sets the number of replicas for an MongoDB instance
func SetPostgresqlReplicas ¶
SetPostgresqlReplicas sets the number of replicas for an Postgresql instance
func SetupKogitoBuildImageStreams ¶
func SetupKogitoBuildImageStreams(kogitoBuild api.KogitoBuildInterface)
SetupKogitoBuildImageStreams sets the correct images for the KogitoBuild
func StartPodLogCollector ¶
StartPodLogCollector monitors a namespace and stores logs of all pods running in the namespace
func StartProcess ¶
StartProcess starts new process instance
func StopPodLogCollector ¶
StopPodLogCollector waits until all logs are stored on disc
func SubscriptionResolutionFails ¶
func SubscriptionResolutionFails(namespace, operatorPackageName, operatorSource string) (bool, error)
SubscriptionResolutionFails returns true when Subscription fails to be resolved with error message
func ToResourceRequirements ¶
func ToResourceRequirements(requests string, limits string) corev1.ResourceRequirements
ToResourceRequirements parses the requests and limits into corev1.ResourceRequirements
func WaitAndRetrieveEndpointURI ¶
WaitAndRetrieveEndpointURI waits for a route and returns its URI
func WaitFor ¶
func WaitFor(namespace, display string, timeout time.Duration, condition func() (bool, error), errorConditions ...func() (bool, error)) error
WaitFor waits for a specification condition to be met or until one error condition is met
func WaitForAllPodsByDeploymentConfigToContainTextInLog ¶
func WaitForAllPodsByDeploymentConfigToContainTextInLog(namespace, dcName, logText string, timeoutInMin int) error
WaitForAllPodsByDeploymentConfigToContainTextInLog waits for pods of specified deployment config to contain specified text in log
func WaitForAllPodsByDeploymentToContainTextInLog ¶
func WaitForAllPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error
WaitForAllPodsByDeploymentToContainTextInLog waits for pods of specified deployment to contain specified text in log
func WaitForAnyPodsByDeploymentToContainTextInLog ¶
func WaitForAnyPodsByDeploymentToContainTextInLog(namespace, dName, logText string, timeoutInMin int) error
WaitForAnyPodsByDeploymentToContainTextInLog waits for pods of specified deployment to contain specified text in log
func WaitForBrokerResource ¶
WaitForBrokerResource waits until the Broker ready status is True
func WaitForBuildComplete ¶
WaitForBuildComplete waits for a build to be completed
func WaitForBuildConfigCreated ¶
WaitForBuildConfigCreated waits for a build config to be created
func WaitForBuildConfigCreatedWithWebhooks ¶
func WaitForBuildConfigCreatedWithWebhooks(namespace, buildConfigName string, expectedWebhooks []api.WebHookSecretInterface, timeoutInMin int) error
WaitForBuildConfigCreatedWithWebhooks waits for a build config to be created with webhooks
func WaitForBuildConfigToHaveResources ¶
func WaitForBuildConfigToHaveResources(namespace, buildConfigName string, expected v1.ResourceRequirements, timeoutInMin int) error
WaitForBuildConfigToHaveResources waits for build config to have the expected resources
func WaitForClusterWideOperatorRunning ¶
func WaitForClusterWideOperatorRunning(operatorPackageName string, catalog OperatorCatalog, timeoutInMin int) error
WaitForClusterWideOperatorRunning waits for a cluster wide operator to be running
func WaitForDeploymentConfigRunning ¶
WaitForDeploymentConfigRunning waits for a deployment config to be running, with a specific number of pod
func WaitForDeploymentRunning ¶
WaitForDeploymentRunning waits for a deployment to be running, with a specific number of pod
func WaitForFailedHTTPRequest ¶
func WaitForFailedHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
WaitForFailedHTTPRequest waits for an HTTP request to fail
func WaitForFailingGraphQLRequest ¶
WaitForFailingGraphQLRequest waits for an GraphQL request to be fail
func WaitForFailingGraphQLRequestUsingAccessToken ¶
func WaitForFailingGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int) error
WaitForFailingGraphQLRequestUsingAccessToken waits for an GraphQL request using access token to be fail
func WaitForForbiddenHTTPRequest ¶
func WaitForForbiddenHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
WaitForForbiddenHTTPRequest waits for an HTTP request to be unauthorized
func WaitForInfinispanPodsToBeRunningWithConfig ¶
func WaitForInfinispanPodsToBeRunningWithConfig(namespace string, expectedConfig infinispan.InfinispanContainerSpec, numberOfPods, timeoutInMin int) error
WaitForInfinispanPodsToBeRunningWithConfig waits for an Infinispan pod to be running with the expected configuration
func WaitForKogitoDataIndexService ¶
WaitForKogitoDataIndexService wait for Kogito Data Index to be deployed
func WaitForKogitoExplainabilityService ¶
WaitForKogitoExplainabilityService wait for Kogito Explainability to be deployed
func WaitForKogitoInfraResource ¶
func WaitForKogitoInfraResource(namespace, name string, timeoutInMin int, getKogitoInfra func(namespace, name string) (api.KogitoInfraInterface, error)) error
WaitForKogitoInfraResource waits for the given KogitoInfra resource to be ready
func WaitForKogitoJobsService ¶
WaitForKogitoJobsService wait for Kogito Jobs Service to be deployed
func WaitForKogitoJobsServiceLogContainsTextWithinMinutes ¶
func WaitForKogitoJobsServiceLogContainsTextWithinMinutes(namespace, logText string, timeoutInMin int) error
WaitForKogitoJobsServiceLogContainsTextWithinMinutes waits until any pods contains a text
func WaitForKogitoManagementConsoleService ¶
WaitForKogitoManagementConsoleService wait for Kogito Management Console to be deployed
func WaitForKogitoOperatorCatalogSourceReady ¶
func WaitForKogitoOperatorCatalogSourceReady() error
WaitForKogitoOperatorCatalogSourceReady waits for Kogito operator CatalogSource to be ready
func WaitForKogitoOperatorRunning ¶
WaitForKogitoOperatorRunning waits for Kogito operator running
func WaitForKogitoTaskConsoleService ¶
WaitForKogitoTaskConsoleService wait for Kogito Task Console to be deployed
func WaitForKogitoTrustyService ¶
WaitForKogitoTrustyService wait for Kogito Trusty to be deployed
func WaitForKogitoTrustyUIService ¶
WaitForKogitoTrustyUIService wait for Kogito Management Console to be deployed
func WaitForMessagesOnTopic ¶
func WaitForMessagesOnTopic(namespace, kafkaInstanceName, topic string, numberOfMsg int, timeoutInMin int) error
WaitForMessagesOnTopic waits for at least a certain number of messages are present on the given topic
func WaitForMongoDBOperatorRunning ¶
WaitForMongoDBOperatorRunning waits for MongoDB operator to be running
func WaitForOnKubernetes ¶
func WaitForOnKubernetes(namespace, display string, timeoutInMin int, condition func() (bool, error)) error
WaitForOnKubernetes is a specific method
func WaitForOnOpenshift ¶
func WaitForOnOpenshift(namespace, display string, timeoutInMin int, condition func() (bool, error), errorConditions ...func() (bool, error)) error
WaitForOnOpenshift waits for a specification condition
func WaitForOperatorGroup ¶
WaitForOperatorGroup for an operator group to be available
func WaitForOperatorRunning ¶
func WaitForOperatorRunning(namespace, operatorPackageName string, catalog OperatorCatalog, timeoutInMin int) error
WaitForOperatorRunning waits for an operator to be running
func WaitForPodsByDeploymentConfigToHaveResources ¶
func WaitForPodsByDeploymentConfigToHaveResources(namespace, dcName string, expected v1.ResourceRequirements, timeoutInMin int) error
WaitForPodsByDeploymentConfigToHaveResources waits for pods to have the expected resources
func WaitForPodsByDeploymentToHaveResources ¶
func WaitForPodsByDeploymentToHaveResources(namespace, dName string, expected v1.ResourceRequirements, timeoutInMin int) error
WaitForPodsByDeploymentToHaveResources waits for pods to have the expected resources
func WaitForPodsInNamespace ¶
WaitForPodsInNamespace waits for pods in specific namespace to be available and running
func WaitForPodsWithLabel ¶
func WaitForPodsWithLabel(namespace, labelName, labelValue string, numberOfPods, timeoutInMin int) error
WaitForPodsWithLabel waits for pods with specific label to be available and running
func WaitForPodsWithLabels ¶
func WaitForPodsWithLabels(namespace string, labels map[string]string, numberOfPods, timeoutInMin int) error
WaitForPodsWithLabels waits for pods with specific label to be available and running
func WaitForPostgresqlInstance ¶
WaitForPostgresqlInstance waits for Postgresql instance pods to be up
func WaitForRoute ¶
WaitForRoute waits for a route to be available
func WaitForService ¶
WaitForService waits that the service has a certain number of replicas
func WaitForSuccessfulGraphQLRequest ¶
func WaitForSuccessfulGraphQLRequest(namespace, uri, path, query string, timeoutInMin int, response interface{}, analyzeResponse func(response interface{}) (bool, error)) error
WaitForSuccessfulGraphQLRequest waits for an GraphQL request to be successful
func WaitForSuccessfulGraphQLRequestUsingAccessToken ¶
func WaitForSuccessfulGraphQLRequestUsingAccessToken(namespace, uri, path, query, accessToken string, timeoutInMin int, response interface{}, analyzeResponse func(response interface{}) (bool, error)) error
WaitForSuccessfulGraphQLRequestUsingAccessToken waits for an GraphQL request using access token to be successful
func WaitForSuccessfulGraphQLRequestUsingPagination ¶
func WaitForSuccessfulGraphQLRequestUsingPagination(namespace, uri, path, query string, timeoutInMin, pageSize, totalSize int, response interface{}, afterEachResponse func(response interface{}) (bool, error), afterFullRequest func() (bool, error)) error
WaitForSuccessfulGraphQLRequestUsingPagination waits for a GraphQL request with pagination to be successful. You can provide 2 functions:
1. After each response. This is called after every page is queried. Useful for checking the content of each page or appending results for final checks after all pages are retrieved.
2. After full request. This is called once after all pages are queried. Useful for final checks on all results.
If more than one page is to be retrieved, include the `$offset` variable in the query which will be used for pagination.
func WaitForSuccessfulHTTPRequest ¶
func WaitForSuccessfulHTTPRequest(namespace string, requestInfo HTTPRequestInfo, timeoutInMin int) error
WaitForSuccessfulHTTPRequest waits for an HTTP request to be successful
func WaitForTrigger ¶
WaitForTrigger waits until the Trigger ready status is True
Types ¶
type Command ¶
type Command interface { // WithLoggerContext method attaches a logger context to trace all the command logs when executing it. WithLoggerContext(loggerContext string) Command // InDirectory method sets the directory where the command will be executed. InDirectory(directory string) Command // WithRetry method defines retry options to be applied to the command. WithRetry(opts ...RetryOption) Command // Sync method allows to execute only one command at a time based on the syncID. Sync(syncID string) Command // Execute command and returns the outputs. Execute() (string, error) }
Command wraps information about the command to execute.
func CreateCommand ¶
CreateCommand methods initializes the basic data to run commands.
type ContainerEngine ¶
type ContainerEngine interface { // PullImage pull image from external registry to internal registry PullImage(imageTag string) ContainerEngine // PushImage push image from internal registry to external registry PushImage(imageTag string) ContainerEngine // BuildImage builds the container image from specified directory BuildImage(projectLocation, imageTag string) ContainerEngine // Setup the retry for the different commands WithRetry(retryNb int) ContainerEngine // GetError returns error in case any execution failed GetError() error }
ContainerEngine is the engine providing container and registry functionality
func GetContainerEngine ¶
func GetContainerEngine(namespace string) ContainerEngine
GetContainerEngine returns container engine based on test configuration
type DecisionsResponse ¶
type DecisionsResponse struct { Status string `json:"status"` Saliences []Salience `json:"saliencies"` }
DecisionsResponse represents the decision response
func GetKogitoTrustyDecisionsByExecutionName ¶
func GetKogitoTrustyDecisionsByExecutionName(namespace, executionName string, timeoutInMin int) (*DecisionsResponse, error)
GetKogitoTrustyDecisionsByExecutionName gets the decisions made by a given execution name
type HTTPRequestInfo ¶
type HTTPRequestInfo struct {
HTTPMethod, URI, Path, BodyFormat, BodyContent, Token string
Unsecure bool
Headers map[string]string
}
HTTPRequestInfo structure encapsulates all information needed to execute an HTTP request
func NewGETHTTPRequestInfo ¶
func NewGETHTTPRequestInfo(uri, path string) HTTPRequestInfo
NewGETHTTPRequestInfo constructor creates a new HTTPRequestInfo struct with the GET HTTP method
func NewPOSTHTTPRequestInfo ¶
func NewPOSTHTTPRequestInfo(uri, path, bodyFormat, bodyContent string) HTTPRequestInfo
NewPOSTHTTPRequestInfo constructor creates a new HTTPRequestInfo struct with the POST HTTP method
func NewPOSTHTTPRequestInfoWithHeaders ¶
func NewPOSTHTTPRequestInfoWithHeaders(uri, path string, headers map[string]string, bodyFormat, bodyContent string) HTTPRequestInfo
NewPOSTHTTPRequestInfoWithHeaders constructor creates a new HTTPRequestInfo struct with the POST HTTP method and provided headers
type HTTPRequestResult ¶
type HTTPRequestResult string
HTTPRequestResult represents the success or error of an HTTP request
const ( // HTTPRequestResultSuccess in case of success HTTPRequestResultSuccess HTTPRequestResult = "success" // HTTPRequestResultError in case of error HTTPRequestResultError HTTPRequestResult = "error" )
func ExecuteHTTPRequestsInThreads ¶
func ExecuteHTTPRequestsInThreads(namespace string, requestCount, threadCount int, requestInfo HTTPRequestInfo) ([]HTTPRequestResult, error)
ExecuteHTTPRequestsInThreads executes given number of requests using given number of threads (Go routines). Returns []HTTPRequestResult with the outcome of each thread (HTTPRequestResultSuccess or HTTPRequestResultError). Returns error if the desired number of requests cannot be precisely divided to the threads. Useful for performance testing.
type InstallerType ¶
type InstallerType string
InstallerType defines the type of installer for services
var ( // CLIInstallerType defines the CLI installer CLIInstallerType InstallerType = cliInstallerKey // CRInstallerType defines the CR installer CRInstallerType InstallerType = crInstallerKey )
func GetDefaultInstallerType ¶
func GetDefaultInstallerType() InstallerType
GetDefaultInstallerType returns the default installer type for the tests
type KogitoApplicationDockerfileProvider ¶
type KogitoApplicationDockerfileProvider interface { // GetDockerfileContent returns Dockerfile content for image creation GetDockerfileContent() (string, error) }
KogitoApplicationDockerfileProvider is the API to provide Dockerfile content for image creation based on built project content
func GetKogitoApplicationDockerfileProvider ¶
func GetKogitoApplicationDockerfileProvider(projectLocation string) KogitoApplicationDockerfileProvider
GetKogitoApplicationDockerfileProvider returns KogitoApplicationDockerfileProvider based on project location
type Logger ¶
Logger shared logger struct
type MavenCommand ¶
type MavenCommand interface { // WithLoggerContext method attaches a logger context to trace all the command logs when executing it. WithLoggerContext(loggerContext string) MavenCommand // Execute command and returns the outputs. Execute(targets ...string) (string, error) // SkipTests will skip testing automatically SkipTests() MavenCommand // UpdateArtifacts will force the update of local artifacts UpdateArtifacts() MavenCommand // Profiles sets the profiles to execute Profiles(profiles ...string) MavenCommand // Options adds additional command line options for the Maven command Options(options ...string) MavenCommand }
MavenCommand wraps information about the maven command to execute.
func CreateMavenCommand ¶
func CreateMavenCommand(directory string) MavenCommand
CreateMavenCommand methods initializes the basic data to run maven commands.
type MongoDBUserCred ¶
type MongoDBUserCred struct { Name string AuthDatabase string SecretName string Databases []string }
MongoDBUserCred holds information to create a MongoDB user in MongoDB, secretName containing the password
type OperatorCatalog ¶
type OperatorCatalog struct {
// contains filtered or unexported fields
}
OperatorCatalog OLM operator catalog
func GetCommunityCatalog ¶
func GetCommunityCatalog() OperatorCatalog
GetCommunityCatalog returns OperatorCatalog with community operators
func GetCustomKogitoOperatorCatalog ¶
func GetCustomKogitoOperatorCatalog() OperatorCatalog
GetCustomKogitoOperatorCatalog returns OperatorCatalog containing custom Kogito operator informations
func GetOperatorCatalog ¶
func GetOperatorCatalog(namespace, source string) OperatorCatalog
GetOperatorCatalog creates the operator catalog based given on Source and namespace
func GetProductCatalog ¶
func GetProductCatalog() OperatorCatalog
GetProductCatalog returns OperatorCatalog with red hat operators
type Opts ¶
type Opts struct { // Verbose will increase logging Verbose bool // Output specifies where to log Output io.Writer }
Opts describe logger options
type RetryOption ¶
type RetryOption func(*commandStruct)
RetryOption declares funtion to be applied on Retry
func NumberOfRetries ¶
func NumberOfRetries(retries int) RetryOption
NumberOfRetries declares funtion setting number of retries
func RetryDelay ¶
func RetryDelay(delay time.Duration) RetryOption
RetryDelay declares funtion setting delay between retries
type Salience ¶
type Salience struct {
OutcomeName string `json:"outcomeName"`
}
Salience represents the salience response
type Task ¶
Task Kogito process task representation
func GetTasks ¶
func GetTasks(namespace, routeURI, processName, processInstanceID string) (foundTasks []Task, err error)
GetTasks retrieves tasks of specific process instance
func GetTasksByUser ¶
func GetTasksByUser(namespace, routeURI, processName, processInstanceID, user string) (foundTasks []Task, err error)
GetTasksByUser retrieves tasks of specific process instance and user
Source Files ¶
- check_setup.go
- cli.go
- command.go
- container_engine.go
- dockerfile_provider.go
- env.go
- grafana.go
- graphql.go
- http.go
- infinispan.go
- installer.go
- kafka.go
- keycloak.go
- knative.go
- kogitobuild.go
- kogitodataindex.go
- kogitoexplainability.go
- kogitoinfra.go
- kogitojobsservice.go
- kogitomgmtconsole.go
- kogitoruntime.go
- kogitoserviceutils.go
- kogitotaskconsole.go
- kogitotrusty.go
- kogitotrustyui.go
- kubernetes.go
- logger.go
- logging.go
- maven.go
- mongodb.go
- namespace.go
- openshift.go
- openshift_resources.go
- operator.go
- postgresql.go
- process.go
- prometheus.go
- subscription.go
- task.go
- util.go