testconstants

package
v1.113.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

testsconstants contains constants used in tests.

testsconstants contains constants used in tests.

Index

Constants

This section is empty.

Variables

View Source
var (
	// RepresentativeCRUDTestsForAllServices specify which test case should be used for each service
	// in the Presubmit-lite job. The format of this service-to-testname mapping is:
	// "<service>" : {"<kind/testname>", "optional testname2"}
	//
	// When adding a new service/updating this list, prioritize test cases with more
	// depedencies for more resource coverage in our presubmit-lite test.
	RepresentativeCRUDTestsForAllServices = map[string][]string{
		"accesscontextmanager": {"accesscontextmanagerserviceperimeter"},
		"alloydb":              {"fullalloydbcluster"},
		"apigee":               {"apigeeenvironment"},
		"artifactregistry":     {"artifactregistryrepository"},
		"bigquery":             {"bigqueryjob"},
		"bigtable":             {"bigtablegcpolicy"},
		"billingbudgets":       {"custombudget"},
		"binaryauthorization":  {"namespacepolicytoclusterpolicy"},
		"certificatemanager":   {"certificatemanagercertificatemapentry"},
		"cloudbuild":           {"cloudbuildtrigger"},
		"cloudfunctions":       {"httpsfunction"},
		"cloudidentity":        {"addexpirydatecloudidentitymembership"},
		"cloudscheduler":       {"cloudschedulerjob"},
		"compute":              {"globalcomputeforwardingrule"},
		"configcontroller":     {"configcontrollerinstance"},
		"container":            {"containernodepool"},
		"containeranalysis":    {"containeranalysisnote"},
		"dataflow":             {"streamingdataflowjobupdatetemplate"},
		"datafusion":           {"datafusioninstance"},
		"dataproc":             {"dataproccluster"},
		"dlp":                  {"cloudstoragepathstoredinfotype"},
		"dns":                  {"dnsrecordset"},
		"eventarc":             {"eventarctrigger"},
		"filestore":            {"filestorebackup"},
		"gkehub":               {"gkehubfeaturemembership"},
		"firestore":            {"firestoreindex"},
		"iam":                  {"oidcworkloadidentitypoolprovider"},
		"iap":                  {"iapidentityawareproxyclient"},
		"identityplatform":     {"identityplatformoauthidpconfig"},
		"kms":                  {"kmscryptokey"},
		"logging":              {"logginglogview"},
		"memcache":             {"memcacheinstance"},
		"monitoring":           {"monitoringalertpolicy"},
		"networkconnectivity":  {"networkconnectivityhub"},
		"networksecurity":      {"networksecurityclienttlspolicy"},
		"networkservices":      {"networkservicesgrpcroute"},
		"osconfig":             {"osconfigguestpolicy"},
		"privateca":            {"basiccertificate"},
		"pubsub":               {"pubsubsubscription"},
		"pubsublite":           {"pubsublitereservation"},
		"recaptchaenterprise":  {"androidrecaptchaenterprisekey"},
		"redis":                {"redisinstance"},
		"resourcemanager":      {"resourcemanagerlien"},
		"run":                  {"runservicebasic"},
		"secretmanager":        {"secretmanagersecretversion"},
		"servicedirectory":     {"servicedirectorynamespace"},
		"servicenetworking":    {"servicenetworkingconnection"},
		"serviceusage":         {"service"},
		"sourcerepo":           {"sourcereporepository"},
		"spanner":              {"spannerdatabase"},
		"sql":                  {"sqluser"},
		"storage":              {"storagenotification"},
		"storagetransfer":      {"storagetransferjob"},
		"vpcaccess":            {"subnetconnector"},
		"edgecontainer":        {"edgecontainercluster"},
	}

	DynamicTestPackagePath = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/dynamic/..."
)
View Source
var TestNameRegexToSkipForTestCRUD = []string{

	".*orgrole.*",

	".*(edgenetwork).*",

	".*(edgecontainernodepool).*",

	".*(edgecontainervpnconnection).*",

	".*(containerattachedcluster).*",
}

TestNameRegexToSkipForTestCRUD is similar to TestNameRegexToSkip, but is specific for the TestCRUD tests.

The same recommendations for documentation as TestNameRegexesToSkip apply.

View Source
var TestNameRegexesToSkip = []string{

	".*(eventfunction).*",

	".*(gkehubfeaturemembership|mcifeature).*",

	".*(streamingdataflowjobupdateparameters).*",

	".*(calendarbudget).*",

	".*(edgenetwork).*",

	".*(edgecontainernodepool).*",

	".*(edgecontainervpnconnection).*",

	".*(containerattachedcluster).*",
}

TestNameSubstringsToSkip contains a list of substrings that test names are matched against, to skip.

Typically these are skipped temporaily, and each string should include a comment with a ticket to denote the temporary issue being addressed, and if possibly a date to remove.

Functions

func GetPresubmitLiteRegexStringArray added in v1.90.0

func GetPresubmitLiteRegexStringArray() []string

func JoinTestNamesWithRegexFormat added in v1.90.0

func JoinTestNamesWithRegexFormat(testNames []string) string

JoinTestNamesWithRegexFormat ensures that only tests that match the "-foobar" test name will run. For example, ServiceUsage's test name 'service' is a common substring that can be used by many tests, but specifying the '-' prefix and using '$' to indicate where the string should end will ensure that only the specified test will run. The expected output will look something like this: "-pubsubtopic$|-service$|-sqluser$"

Types

This section is empty.

Jump to

Keyboard shortcuts

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