testutils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KubeClient *kubernetes.Clientset

KubeClient ...

View Source
var KubeConfigPath string

KubeConfigPath ...

View Source
var Restconfig *rest.Config

Restconfig ...

View Source
var TestConfig = LoadTestConfig()

TestConfig ...

Functions

func CreateUniqueID

func CreateUniqueID() string

CreateUniqueID ...

func CreateUniqueNamespace

func CreateUniqueNamespace(prefix string) string

CreateUniqueNamespace ...

func ExecCmd

func ExecCmd(args ...string) (string, error)

ExecCmd ...

func FlagWasSet

func FlagWasSet(flagArgs []string, flagName string) bool

FlagWasSet ...

func GenName

func GenName(appName string) string

GenName ...

func GetAlertSecurityContextsPath1

func GetAlertSecurityContextsPath1() string

GetAlertSecurityContextsPath1 ...

func GetAlertSecurityContextsPath2

func GetAlertSecurityContextsPath2() string

GetAlertSecurityContextsPath2 ...

func GetBlackDuckSecurityContextsPath1

func GetBlackDuckSecurityContextsPath1() string

GetBlackDuckSecurityContextsPath1 ...

func GetBlackDuckSecurityContextsPath2

func GetBlackDuckSecurityContextsPath2() string

GetBlackDuckSecurityContextsPath2 ...

func GetBlackDuckTLSCertPath

func GetBlackDuckTLSCertPath() string

GetBlackDuckTLSCertPath ...

func GetBlackDuckTLSKeyPath

func GetBlackDuckTLSKeyPath() string

GetBlackDuckTLSKeyPath ...

func GetKubeClientFromOutsideCluster

func GetKubeClientFromOutsideCluster(kubeconfigpath string, insecureSkipTLSVerify bool) (*rest.Config, error)

GetKubeClientFromOutsideCluster returns the rest config of outside cluster

func GetKubeConfig

func GetKubeConfig(kubeconfigpath string, insecureSkipTLSVerify bool) (*rest.Config, error)

GetKubeConfig returns a kubeconfig for inside or outside the cluster

func GetLatestAlertVersion

func GetLatestAlertVersion() string

GetLatestAlertVersion ...

func GetLatestBDBAVersion

func GetLatestBDBAVersion() string

GetLatestBDBAVersion ...

func GetLatestBlackDuckVersion

func GetLatestBlackDuckVersion() string

GetLatestBlackDuckVersion ...

func GetLatestOpsSightVersion

func GetLatestOpsSightVersion() string

GetLatestOpsSightVersion ...

func GetLatestPolarisReportingVersion

func GetLatestPolarisReportingVersion() string

GetLatestPolarisReportingVersion ...

func GetLatestPolarisVersion

func GetLatestPolarisVersion() string

GetLatestPolarisVersion ...

func GetMockServiceAccount

func GetMockServiceAccount() string

GetMockServiceAccount ...

func GetMockTLSCertificate

func GetMockTLSCertificate() string

GetMockTLSCertificate ...

func GetMockTLSKey

func GetMockTLSKey() string

GetMockTLSKey ...

func GetPolarisReportingServiceAccountPath

func GetPolarisReportingServiceAccountPath() string

GetPolarisReportingServiceAccountPath ...

func Helm

func Helm(cmdString string, args ...interface{}) (string, error)

Helm ...

func SetAppResourcesPath

func SetAppResourcesPath(flagArgs []string) []string

SetAppResourcesPath ...

func SetBlackDuckRegistry

func SetBlackDuckRegistry(flagArgs []string) []string

SetBlackDuckRegistry ...

func SetUpClusterClients

func SetUpClusterClients() error

SetUpClusterClients ...

func SynopsysctlOperator

func SynopsysctlOperator(cmdString string, args ...interface{}) (string, error)

SynopsysctlOperator ...

func Synospysctl

func Synospysctl(cmdString string, args ...interface{}) (string, error)

Synospysctl ...

Types

type AlertTestConfig

type AlertTestConfig struct {
	Version          string `json:"version"`
	AppResourcesPath string `json:"appResourcesPath"`
}

AlertTestConfig ...

type AlertTester

type AlertTester struct {
	AppName   string
	Name      string
	Namespace string
	Version   string
	Labels    string
	FlagTree  alert.FlagTree
}

AlertTester ...

func NewAlertTester

func NewAlertTester() *AlertTester

NewAlertTester ...

func (AlertTester) Verify

func (t AlertTester) Verify() error

Verify ...

func (AlertTester) WaitUntilReady

func (t AlertTester) WaitUntilReady()

WaitUntilReady ...

type BDBATestConfig

type BDBATestConfig struct {
	Version          string `json:"version"`
	AppResourcesPath string `json:"appResourcesPath"`
}

BDBATestConfig ...

type BDBATester

type BDBATester struct {
	AppName   string
	Namespace string
	Version   string
	Labels    string
	FlagTree  bdba.FlagTree
}

BDBATester ...

func NewBDBATester

func NewBDBATester() *BDBATester

NewBDBATester ...

func (BDBATester) Verify

func (t BDBATester) Verify() error

Verify ...

func (BDBATester) WaitUntilReady

func (t BDBATester) WaitUntilReady()

WaitUntilReady ...

type BlackDuckTestConfig

type BlackDuckTestConfig struct {
	Version          string `json:"version"`
	AppResourcesPath string `json:"appResourcesPath"`
	Registry         string `json:"registry"`
	TLSCertPath      string `json:"tlsCertPath"`
	TLSKeyPath       string `json:"tlsKeyPath"`
}

BlackDuckTestConfig ...

type BlackDuckTester

type BlackDuckTester struct {
	AppName   string
	Name      string
	Namespace string
	Version   string
	Labels    string
	FlagTree  blackduck.FlagTree
}

BlackDuckTester ...

func NewBlackDuckTester

func NewBlackDuckTester() *BlackDuckTester

NewBlackDuckTester ...

func (BlackDuckTester) Verify

func (t BlackDuckTester) Verify() error

Verify ...

func (BlackDuckTester) WaitUntilReady

func (t BlackDuckTester) WaitUntilReady()

WaitUntilReady ...

type OpsSightTestConfig

type OpsSightTestConfig struct {
	Version          string `json:"version"`
	AppResourcesPath string `json:"appResourcesPath"`
}

OpsSightTestConfig ...

type OpsSightTester

type OpsSightTester struct {
	AppName   string
	Name      string
	Namespace string
	Version   string
	Labels    string
	FlagTree  opssight.FlagTree
}

OpsSightTester ...

func NewOpsSightTester

func NewOpsSightTester() *OpsSightTester

NewOpsSightTester ...

func (OpsSightTester) Verify

func (t OpsSightTester) Verify() error

Verify ...

func (OpsSightTester) WaitUntilReady

func (t OpsSightTester) WaitUntilReady()

WaitUntilReady ...

type PolarisReportingTestConfig

type PolarisReportingTestConfig struct {
	Version            string `json:"version"`
	AppResourcesPath   string `json:"appResourcesPath"`
	ServiceAccountPath string `json:"serviceAccountPath"`
}

PolarisReportingTestConfig ...

type PolarisReportingTester

type PolarisReportingTester struct {
	AppName   string
	Namespace string
	Version   string
	Labels    string
	FlagTree  reporting.FlagTree
}

PolarisReportingTester ...

func NewPolarisReportingTester

func NewPolarisReportingTester() *PolarisReportingTester

NewPolarisReportingTester ...

func (PolarisReportingTester) Verify

func (t PolarisReportingTester) Verify() error

Verify ...

func (PolarisReportingTester) WaitUntilReady

func (t PolarisReportingTester) WaitUntilReady()

WaitUntilReady ...

type PolarisTestConfig

type PolarisTestConfig struct {
	Version          string `json:"version"`
	AppResourcesPath string `json:"appResourcesPath"`
}

PolarisTestConfig ...

type PolarisTester

type PolarisTester struct {
	AppName   string
	Namespace string
	Version   string
	Labels    string
	FlagTree  polaris.FlagTree
}

PolarisTester ...

func NewPolarisTester

func NewPolarisTester() *PolarisTester

NewPolarisTester ...

func (PolarisTester) Verify

func (t PolarisTester) Verify() error

Verify ...

func (PolarisTester) WaitUntilReady

func (t PolarisTester) WaitUntilReady()

WaitUntilReady ...

type TestConfigStruct

type TestConfigStruct struct {
	// Config
	AbsolutePathToTestSuite string `json:"absolutePathToTestSuite"`

	// Synopsysctl
	SynopsysctlPath         string `json:"synopsysctlPath"`
	SynopsysctlOperatorPath string `json:"synopsyctlOperatorPath"`

	// App Configs
	Alert            AlertTestConfig            `json:"alert"`
	BDBA             BDBATestConfig             `json:"bdba"`
	BlackDuck        BlackDuckTestConfig        `json:"blackDuck"`
	OpsSight         OpsSightTestConfig         `json:"opsSight"`
	Polaris          PolarisTestConfig          `json:"polaris"`
	PolarisReporting PolarisReportingTestConfig `json:"polarisReporting"`
}

TestConfigStruct ...

func LoadTestConfig

func LoadTestConfig() TestConfigStruct

LoadTestConfig ...

Jump to

Keyboard shortcuts

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