Documentation
¶
Index ¶
- func CLITestSuite(ctx context.Context, tswg *sync.WaitGroup, testSuites chan *junitxml.TestSuite, ...)
- func ContainsAll(arr []string, subarr []string, junit *junitxml.TestCase, logger *log.Logger, ...)
- func ContainsNone(arr []string, subarr []string, junit *junitxml.TestCase, logger *log.Logger, ...)
- func ContainsSubString(strs []string, s string) bool
- func Failure(testCase *junitxml.TestCase, logger *log.Logger, msg string)
- func GcloudAuth(logger *log.Logger, testCase *junitxml.TestCase) bool
- func GcloudUpdate(logger *log.Logger, testCase *junitxml.TestCase, latest bool) bool
- func GuestOSFeatures(requiredGuestOsFeatures []string, notAllowedGuestOsFeatures []string, ...)
- func RunCliTool(logger *log.Logger, testCase *junitxml.TestCase, cmdString string, ...) error
- func RunTestCommand(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) bool
- func RunTestCommandAssertErrorMessage(cmd string, args []string, expectedErrorMessage string, logger *log.Logger, ...) bool
- func RunTestCommandAsync(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) *exec.Cmd
- func RunTestCommandIgnoringError(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) bool
- func RunTestForTestType(cmd string, args []string, testType CLITestType, logger *log.Logger, ...) bool
- type CLITestType
- type ServiceAccountTestVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CLITestSuite ¶
func CLITestSuite(ctx context.Context, tswg *sync.WaitGroup, testSuites chan *junitxml.TestSuite, logger *log.Logger, testSuiteRegex, testCaseRegex *regexp.Regexp, testProjectConfig *testconfig.Project, testSuiteName string, testsMap map[CLITestType]map[*junitxml.TestCase]func( context.Context, *junitxml.TestCase, *log.Logger, *testconfig.Project, CLITestType))
CLITestSuite executes given test suite.
func ContainsAll ¶
func ContainsAll(arr []string, subarr []string, junit *junitxml.TestCase, logger *log.Logger, failureMessage string)
ContainsAll asserts all given strings in subarr exists in arr
func ContainsNone ¶
func ContainsNone(arr []string, subarr []string, junit *junitxml.TestCase, logger *log.Logger, failureMessage string)
ContainsNone asserts some given strings in subarr exists in arr
func ContainsSubString ¶
ContainsSubString checks whether the string slice contains a substring anywhere.
func GcloudAuth ¶
GcloudAuth runs "gcloud auth"
func GcloudUpdate ¶
GcloudUpdate runs "gcloud update" to pull either latest or prod version
func GuestOSFeatures ¶
func GuestOSFeatures(requiredGuestOsFeatures []string, notAllowedGuestOsFeatures []string, actualGuestOSFeatures []*compute.GuestOsFeature, junit *junitxml.TestCase, logger *log.Logger)
GuestOSFeatures asserts expected & unexpected guestOSFeatures.
func RunCliTool ¶
func RunCliTool(logger *log.Logger, testCase *junitxml.TestCase, cmdString string, args []string) error
RunCliTool runs a cli tool with given args
func RunTestCommand ¶
func RunTestCommand(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) bool
RunTestCommand runs given test command
func RunTestCommandAssertErrorMessage ¶
func RunTestCommandAssertErrorMessage(cmd string, args []string, expectedErrorMessage string, logger *log.Logger, testCase *junitxml.TestCase) bool
RunTestCommandAssertErrorMessage runs given test command and assert given error message appears.
func RunTestCommandAsync ¶
func RunTestCommandAsync(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) *exec.Cmd
RunTestCommandAsync runs given test command asynchronously
func RunTestCommandIgnoringError ¶
func RunTestCommandIgnoringError(cmd string, args []string, logger *log.Logger, testCase *junitxml.TestCase) bool
RunTestCommandIgnoringError runs given test command. The test case won't be marked as fail even error happens.
func RunTestForTestType ¶
func RunTestForTestType(cmd string, args []string, testType CLITestType, logger *log.Logger, testCase *junitxml.TestCase) bool
RunTestForTestType runs test for given test type
Types ¶
type CLITestType ¶
type CLITestType string
CLITestType defines which type of test is going to be executed
const ( Wrapper CLITestType = "1 wrapper" GcloudBetaProdWrapperLatest CLITestType = "2 gcloud(beta)-prod wrapper-latest" GcloudBetaLatestWrapperLatest CLITestType = "3 gcloud(beta)-latest wrapper-latest" GcloudGaLatestWrapperRelease CLITestType = "4 gcloud(ga)-latest wrapper-release" )
List all test types here
type ServiceAccountTestVariables ¶
type ServiceAccountTestVariables struct { ProjectID string ComputeServiceAccount string InstanceServiceAccount string }
ServiceAccountTestVariables contains service-account related test variables.
func GetServiceAccountTestVariables ¶
func GetServiceAccountTestVariables(argMap map[string]string, isDefaultServiceAccountDisabled bool) (v ServiceAccountTestVariables, ok bool)
GetServiceAccountTestVariables extract extra test variables related to service account from input variable map.
Directories
¶
Path | Synopsis |
---|---|
test_suites/export
Package exporttestsuites contains e2e tests for image export cli tools
|
Package exporttestsuites contains e2e tests for image export cli tools |
test_suites/import
Package importtestsuites contains e2e tests for image import cli tools
|
Package importtestsuites contains e2e tests for image import cli tools |
test_suites/onestep_import
Package onestepimporttestsuites contains e2e tests for gce_onestep_image_import
|
Package onestepimporttestsuites contains e2e tests for gce_onestep_image_import |
test_suites/instance_ovf_export
Package instanceovfexporttestsuite contains e2e tests for instance export cli tools
|
Package instanceovfexporttestsuite contains e2e tests for instance export cli tools |
test_suites/ovf_instance_import
Package ovfinstanceimporttestsuite contains e2e tests for instance import cli tools
|
Package ovfinstanceimporttestsuite contains e2e tests for instance import cli tools |
test_suites/ovf_machine_image_import
Package ovfmachineimageimporttestsuite contains e2e tests for machine image import cli tools
|
Package ovfmachineimageimporttestsuite contains e2e tests for machine image import cli tools |
test_suites/windows_upgrade
Package testsuite contains e2e tests for gce_windows_upgrade
|
Package testsuite contains e2e tests for gce_windows_upgrade |