testutils

package
v0.0.0-...-bce4990 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RetryableTransientErrors = map[string]string{

		".*Error 400.*There is a peering operation in progress on the local or peer network.*": "Peering operation in progress.",

		".*Error 409.*There were concurrent policy changes.*": "Concurrent policy changes.",

		".*rateLimitExceeded.*": "Rate limit exceeded.",

		".*FOLDER_TO_DELETE_NON_EMPTY_VIOLATION.*": "Failed to delete non empty folder.",

		".*Error 403.*Permission.*denied on resource.*": "Permission denied on resource.",

		".*Error 403.*Request is prohibited by organization's policy.*vpcServiceControlsUniqueIdentifier.*": "Request is prohibited by organization's policy.",

		".*Error getting operation for committing purpose for TagValue.*": "Failed creating TagValue.",

		".*Error 403.*Compute Engine API has not been used in project.*": "Compute Engine API not enabled",

		".*Error 400.*Service account.*does not exist*": "Error setting IAM policy",

		".*Error waiting for Create Service Networking Connection.*Error code 16.*Expected OAuth 2 access token.*": "Request had invalid authentication credentials.",

		".*Error 400: The eTag provided.*does not match the eTag of the current version of the Access Policy, which is.*": "Conflict during Access Policy configuration.",
	}
)

Functions

func CheckAPIEnabled

func CheckAPIEnabled(t *testing.T, projectID, api string) (bool, error)

func GetLastSplitElement

func GetLastSplitElement(value string, sep string) string

func GetOrgACMPolicyID

func GetOrgACMPolicyID(t testing.TB, orgID string) string

GetOrgACMPolicyID gets the Organization Access Context Manager Policy ID

func GetResultFieldStrSlice

func GetResultFieldStrSlice(rs []gjson.Result, field string) []string

getResultFieldStrSlice parses a field of a results list into a string slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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