utils

package
v0.0.0-...-0312a9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImagePullSecretName = "apicurio-registry-pull-secret"

	OperatorNamespace     = "apicurio-registry-e2e"
	OperatorVersionEnvVar = "E2E_OPERATOR_VERSION"
	APIPollInterval       = 2 * time.Second
	MediumPollInterval    = 5 * time.Second
	LongPollInterval      = 10 * time.Second

	StorageSql      = "sql"
	StorageKafkaSql = "kafkasql"
)

constants to be used in testsuite

Variables

View Source
var ApicurioProjectDir string = os.Getenv(apicurioProjectDirEnvVar)

ApicurioProjectDir value of ApicurioProjectDirEnvVar

View Source
var ApicurioTestsProfile string = os.Getenv(apicurioTestsProfileEnvVar)

ApicurioTestsProfile value of ApicurioTestsProfileEnvVar

View Source
var ApicurioTestsProfileDefault string = "smoke"

ApicurioTestsProfileDefault default value for Apicurio Functional testsuite profile

View Source
var ConvertersDistroSha512Sum string = os.Getenv(convertersDistroSha512SumEnvVar)
View Source
var ConvertersURL string = os.Getenv(convertersURLEnvVar)
View Source
var ExtraMavenArgs string = os.Getenv(extraMavenArgsEnvVar)

ExtraMavenArgs value of ExtraMavenArgsEnvVar

View Source
var ImagePullSecretPassword string = os.Getenv(imagePullSecretPasswordEnvVar)
View Source
var ImagePullSecretServer string = os.Getenv(imagePullSecretServerEnvVar)
View Source
var ImagePullSecretUser string = os.Getenv(imagePullSecretUserEnvVar)
View Source
var OLMApicurioCSV string = os.Getenv(oLMApicurioCSVEnvVar)

OLMApicurioCSV value of oLMApicurioCSVEnvVar

View Source
var OLMApicurioChannelName string = os.Getenv(oLMApicurioChannelNameEnvVar)

OLMApicurioChannelName value of oLMApicurioChannelNameEnvVar

View Source
var OLMApicurioPackageManifestName string = os.Getenv(oLMApicurioPackageManifestNameEnvVar)

OLMApicurioPackageManifestName value of OLMApicurioPackageManifestNameEnvVar

View Source
var OLMCatalogSourceImage string = os.Getenv(oLMCatalogSourceImageEnvVar)

OLMCatalogSourceImage value of OLMCatalogSourceImageEnvVar

View Source
var OLMCatalogSourceNamespace string = os.Getenv(oLMCatalogSourceNamespaceEnvVar)

OLMCatalogSourceNamespace value of OLMCatalogSourceNamespaceEnvVar

View Source
var OLMClusterWideOperatorsNamespace string = os.Getenv(oLMClusterWideOperatorsNamespaceEnvVar)

OLMClusterWideOperatorsNamespace value of OLMClusterWideOperatorsNamespaceEnvVar

View Source
var OLMUpgradeChannel string = os.Getenv(oLMUpgradeChannelEnvVar)
View Source
var OLMUpgradeNewCSV string = os.Getenv(oLMUpgradeNewCSVEnvVar)
View Source
var OLMUpgradeOldCSV string = os.Getenv(oLMUpgradeOldCSVEnvVar)
View Source
var OLMUpgradeOldCatalog string = os.Getenv(oLMUpgradeOldCatalogEnvVar)
View Source
var OLMUpgradeOldCatalogNamespace string = os.Getenv(oLMUpgradeOldCatalogNamespaceEnvVar)
View Source
var OLMUseDefaultCatalogSource string = os.Getenv(oLMUseDefaultCatalogSourceEnvVar)

OLMUseDefaultCatalogSource value of oLMUseDefaultCatalogSourceEnvVar

View Source
var OperatorBundlePath string = os.Getenv(operatorBundlePathEnvVar)

OperatorBundlePath value of OperatorBundlePathEnvVar

View Source
var OperatorDeploymentName string = "apicurio-registry-operator"
View Source
var OperatorDeploymentNameOlm string = OperatorDeploymentName + "-v" + os.Getenv(OperatorVersionEnvVar)
View Source
var StrimziOperatorBundlePath string = os.Getenv(strimziOperatorBundlePathEnvVar)

StrimziOperatorBundlePath value of StrimziOperatorBundlePathEnvVar

View Source
var SuiteProjectDir string = os.Getenv(suiteProjectDirEnvVar)

SuiteProjectDir value of SuiteProjectDirEnvVar

Functions

func DownloadFile

func DownloadFile(filepath string, url string) error

func Execute

func Execute(command *Command, stdOutFile *os.File, stdErrFile *os.File, logCmd bool) error

func ExecuteCmd

func ExecuteCmd(logOutput bool, command *Command) error

ExecuteCmd executes a command

func ExecuteCmdCore

func ExecuteCmdCore(logOutput bool, logCmd bool, command *Command) error

func ExecuteCmdOrDie

func ExecuteCmdOrDie(logOutput bool, name string, arg ...string)

ExecuteCmdOrDie executes a command

func ExecuteCmdOrDieCore

func ExecuteCmdOrDieCore(logOutput bool, logCmd bool, name string, arg ...string)

func ReaderToBytes

func ReaderToBytes(reader io.Reader) []byte

func ReaderToString

func ReaderToString(reader io.Reader) string

func Template

func Template(tempName string, templatePath string, replacings ...Replacement) *os.File

Template creates a file under tmp directory, copies the contents of templatePath into that new file and applies all the replacements passed

Types

type Command

type Command struct {
	Cmd []string
	Env []string
}

Command encapsulates parameters of ExecuteCmd

type Replacement

type Replacement struct {
	Old string
	New string
}

Replacement represents a text replacement

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL