Documentation
¶
Overview ¶
Package gcp allows interaction with Google Cloud Platform resources.
Index ¶
- func AssertStorageBucketExists(t testing.TestingT, name string)deprecated
- func AssertStorageBucketExistsContext(t testing.TestingT, ctx context.Context, name string)
- func AssertStorageBucketExistsContextE(t testing.TestingT, ctx context.Context, name string) error
- func AssertStorageBucketExistsE(t testing.TestingT, name string) errordeprecated
- func AssertStorageBucketExistsWithClient(ctx context.Context, client *storage.Client, name string) error
- func AssertSubscriptionExists(t testing.TestingT, projectID string, subscriptionName string)deprecated
- func AssertSubscriptionExistsContext(t testing.TestingT, ctx context.Context, projectID string, ...)
- func AssertSubscriptionExistsContextE(t testing.TestingT, ctx context.Context, projectID string, ...) error
- func AssertSubscriptionExistsE(t testing.TestingT, projectID string, subscriptionName string) errordeprecated
- func AssertSubscriptionExistsWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string) error
- func AssertTopicExists(t testing.TestingT, projectID string, topicName string)deprecated
- func AssertTopicExistsContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
- func AssertTopicExistsContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
- func AssertTopicExistsE(t testing.TestingT, projectID string, topicName string) errordeprecated
- func AssertTopicExistsWithClient(ctx context.Context, client *pubsub.Client, topicName string) error
- func CreateBuild(t testing.TestingT, projectID string, build *cloudbuildpb.Build) *cloudbuildpb.Builddeprecated
- func CreateBuildContext(t testing.TestingT, ctx context.Context, projectID string, ...) *cloudbuildpb.Build
- func CreateBuildContextE(t testing.TestingT, ctx context.Context, projectID string, ...) (*cloudbuildpb.Build, error)
- func CreateBuildE(t testing.TestingT, projectID string, build *cloudbuildpb.Build) (*cloudbuildpb.Build, error)deprecated
- func CreateBuildWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, ...) (*cloudbuildpb.Build, error)
- func CreateStorageBucket(t testing.TestingT, projectID string, name string, attr *storage.BucketAttrs)deprecated
- func CreateStorageBucketContext(t testing.TestingT, ctx context.Context, projectID string, name string, ...)
- func CreateStorageBucketContextE(t testing.TestingT, ctx context.Context, projectID string, name string, ...) error
- func CreateStorageBucketE(t testing.TestingT, projectID string, name string, attr *storage.BucketAttrs) errordeprecated
- func CreateStorageBucketWithClient(ctx context.Context, client *storage.Client, projectID string, name string, ...) error
- func CreateSubscription(t testing.TestingT, projectID string, subscriptionName string, ...)deprecated
- func CreateSubscriptionContext(t testing.TestingT, ctx context.Context, projectID string, ...)
- func CreateSubscriptionContextE(t testing.TestingT, ctx context.Context, projectID string, ...) error
- func CreateSubscriptionE(t testing.TestingT, projectID string, subscriptionName string, ...) errordeprecated
- func CreateSubscriptionWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string, ...) error
- func CreateTopic(t testing.TestingT, projectID string, topicName string)deprecated
- func CreateTopicContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
- func CreateTopicContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
- func CreateTopicE(t testing.TestingT, projectID string, topicName string) errordeprecated
- func CreateTopicWithClient(ctx context.Context, client *pubsub.Client, topicName string) error
- func DeleteGCRImageRef(t testing.TestingT, ref string)deprecated
- func DeleteGCRImageRefContext(t testing.TestingT, ctx context.Context, ref string)
- func DeleteGCRImageRefContextE(t testing.TestingT, ctx context.Context, ref string) error
- func DeleteGCRImageRefE(t testing.TestingT, ref string) errordeprecated
- func DeleteGCRImageRefWithClient(ctx context.Context, client *GCRClient, ref string) error
- func DeleteGCRRepo(t testing.TestingT, repo string)deprecated
- func DeleteGCRRepoContext(t testing.TestingT, ctx context.Context, repo string)
- func DeleteGCRRepoContextE(t testing.TestingT, ctx context.Context, repo string) error
- func DeleteGCRRepoE(t testing.TestingT, repo string) errordeprecated
- func DeleteGCRRepoWithClient(ctx context.Context, client *GCRClient, repo string) error
- func DeleteSSHKey(t testing.TestingT, user, key string)deprecated
- func DeleteSSHKeyContext(t testing.TestingT, ctx context.Context, user, key string)
- func DeleteSSHKeyContextE(t testing.TestingT, ctx context.Context, user, key string) error
- func DeleteSSHKeyE(t testing.TestingT, user, key string) errordeprecated
- func DeleteSSHKeyWithClient(ctx context.Context, service *oslogin.Service, user, key string) error
- func DeleteStorageBucket(t testing.TestingT, name string)deprecated
- func DeleteStorageBucketContext(t testing.TestingT, ctx context.Context, name string)
- func DeleteStorageBucketContextE(t testing.TestingT, ctx context.Context, name string) error
- func DeleteStorageBucketE(t testing.TestingT, name string) errordeprecated
- func DeleteStorageBucketWithClient(ctx context.Context, client *storage.Client, name string) error
- func DeleteSubscription(t testing.TestingT, projectID string, subscriptionName string)deprecated
- func DeleteSubscriptionContext(t testing.TestingT, ctx context.Context, projectID string, ...)
- func DeleteSubscriptionContextE(t testing.TestingT, ctx context.Context, projectID string, ...) error
- func DeleteSubscriptionE(t testing.TestingT, projectID string, subscriptionName string) errordeprecated
- func DeleteSubscriptionWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string) error
- func DeleteTopic(t testing.TestingT, projectID string, topicName string)deprecated
- func DeleteTopicContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
- func DeleteTopicContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
- func DeleteTopicE(t testing.TestingT, projectID string, topicName string) errordeprecated
- func DeleteTopicWithClient(ctx context.Context, client *pubsub.Client, topicName string) error
- func EmptyStorageBucket(t testing.TestingT, name string)deprecated
- func EmptyStorageBucketContext(t testing.TestingT, ctx context.Context, name string)
- func EmptyStorageBucketContextE(t testing.TestingT, ctx context.Context, name string) error
- func EmptyStorageBucketE(t testing.TestingT, name string) errordeprecated
- func EmptyStorageBucketWithClient(ctx context.Context, client *storage.Client, name string) error
- func GetAllGCPRegions(t testing.TestingT, projectID string) []stringdeprecated
- func GetAllGCPRegionsContext(t testing.TestingT, ctx context.Context, projectID string) []string
- func GetAllGCPRegionsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
- func GetAllGCPRegionsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func GetAllGCPRegionsWithClient(ctx context.Context, service *compute.Service, projectID string) ([]string, error)
- func GetAllGCPZones(t testing.TestingT, projectID string) []stringdeprecated
- func GetAllGCPZonesContext(t testing.TestingT, ctx context.Context, projectID string) []string
- func GetAllGCPZonesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
- func GetAllGCPZonesE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func GetAllGCPZonesWithClient(ctx context.Context, service *compute.Service, projectID string) ([]string, error)
- func GetAllGcpRegions(t testing.TestingT, projectID string) []stringdeprecated
- func GetAllGcpRegionsContext(t testing.TestingT, ctx context.Context, projectID string) []stringdeprecated
- func GetAllGcpRegionsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)deprecated
- func GetAllGcpRegionsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func GetAllGcpZones(t testing.TestingT, projectID string) []stringdeprecated
- func GetAllGcpZonesContext(t testing.TestingT, ctx context.Context, projectID string) []stringdeprecated
- func GetAllGcpZonesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)deprecated
- func GetAllGcpZonesE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func GetBuild(t testing.TestingT, projectID string, buildID string) *cloudbuildpb.Builddeprecated
- func GetBuildContext(t testing.TestingT, ctx context.Context, projectID string, buildID string) *cloudbuildpb.Build
- func GetBuildContextE(t testing.TestingT, ctx context.Context, projectID string, buildID string) (*cloudbuildpb.Build, error)
- func GetBuildE(t testing.TestingT, projectID string, buildID string) (*cloudbuildpb.Build, error)deprecated
- func GetBuildWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, ...) (*cloudbuildpb.Build, error)
- func GetBuilds(t testing.TestingT, projectID string) []*cloudbuildpb.Builddeprecated
- func GetBuildsContext(t testing.TestingT, ctx context.Context, projectID string) []*cloudbuildpb.Build
- func GetBuildsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*cloudbuildpb.Build, error)
- func GetBuildsE(t testing.TestingT, projectID string) ([]*cloudbuildpb.Build, error)deprecated
- func GetBuildsForTrigger(t testing.TestingT, projectID string, triggerID string) []*cloudbuildpb.Builddeprecated
- func GetBuildsForTriggerContext(t testing.TestingT, ctx context.Context, projectID string, triggerID string) []*cloudbuildpb.Build
- func GetBuildsForTriggerContextE(t testing.TestingT, ctx context.Context, projectID string, triggerID string) ([]*cloudbuildpb.Build, error)
- func GetBuildsForTriggerE(t testing.TestingT, projectID string, triggerID string) ([]*cloudbuildpb.Build, error)deprecated
- func GetBuildsForTriggerWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, ...) ([]*cloudbuildpb.Build, error)
- func GetBuildsWithClient(ctx context.Context, service *cloudbuild.Client, projectID string) ([]*cloudbuildpb.Build, error)
- func GetGoogleCredentialsFromEnvVar(t testing.TestingT) string
- func GetGoogleIdentityEmailEnvVar(t testing.TestingT) string
- func GetGoogleProjectIDFromEnvVar(t testing.TestingT) string
- func GetGoogleRegionFromEnvVar(t testing.TestingT) string
- func GetLoginProfile(t testing.TestingT, user string) *oslogin.LoginProfiledeprecated
- func GetLoginProfileContext(t testing.TestingT, ctx context.Context, user string) *oslogin.LoginProfile
- func GetLoginProfileContextE(t testing.TestingT, ctx context.Context, user string) (*oslogin.LoginProfile, error)
- func GetLoginProfileE(t testing.TestingT, user string) (*oslogin.LoginProfile, error)deprecated
- func GetLoginProfileWithClient(ctx context.Context, service *oslogin.Service, user string) (*oslogin.LoginProfile, error)
- func GetRandomRegion(t testing.TestingT, projectID string, approvedRegions []string, ...) stringdeprecated
- func GetRandomRegionContext(t testing.TestingT, ctx context.Context, projectID string, ...) string
- func GetRandomRegionContextE(t testing.TestingT, ctx context.Context, projectID string, ...) (string, error)
- func GetRandomRegionE(t testing.TestingT, projectID string, approvedRegions []string, ...) (string, error)deprecated
- func GetRandomZone(t testing.TestingT, projectID string, approvedZones []string, ...) stringdeprecated
- func GetRandomZoneContext(t testing.TestingT, ctx context.Context, projectID string, ...) string
- func GetRandomZoneContextE(t testing.TestingT, ctx context.Context, projectID string, ...) (string, error)
- func GetRandomZoneE(t testing.TestingT, projectID string, approvedZones []string, ...) (string, error)deprecated
- func GetRandomZoneForRegion(t testing.TestingT, projectID string, region string) stringdeprecated
- func GetRandomZoneForRegionContext(t testing.TestingT, ctx context.Context, projectID string, region string) string
- func GetRandomZoneForRegionContextE(t testing.TestingT, ctx context.Context, projectID string, region string) (string, error)
- func GetRandomZoneForRegionE(t testing.TestingT, projectID string, region string) (string, error)deprecated
- func ImportProjectSSHKey(t testing.TestingT, user, key, projectID string)deprecated
- func ImportProjectSSHKeyContext(t testing.TestingT, ctx context.Context, user, key, projectID string)
- func ImportProjectSSHKeyContextE(t testing.TestingT, ctx context.Context, user, key, projectID string) error
- func ImportProjectSSHKeyE(t testing.TestingT, user, key, projectID string) errordeprecated
- func ImportProjectSSHKeyWithClient(ctx context.Context, service *oslogin.Service, user, key, projectID string) error
- func ImportSSHKey(t testing.TestingT, user, key string)deprecated
- func ImportSSHKeyContext(t testing.TestingT, ctx context.Context, user, key string)
- func ImportSSHKeyContextE(t testing.TestingT, ctx context.Context, user, key string) error
- func ImportSSHKeyE(t testing.TestingT, user, key string) errordeprecated
- func ImportSSHKeyWithClient(ctx context.Context, service *oslogin.Service, user, key string) error
- func NewCloudBuildService(t testing.TestingT) *cloudbuild.Clientdeprecated
- func NewCloudBuildServiceContext(t testing.TestingT, ctx context.Context) *cloudbuild.Client
- func NewCloudBuildServiceContextE(t testing.TestingT, ctx context.Context) (*cloudbuild.Client, error)
- func NewCloudBuildServiceE(t testing.TestingT) (*cloudbuild.Client, error)deprecated
- func NewComputeService(t testing.TestingT) *compute.Servicedeprecated
- func NewComputeServiceContext(t testing.TestingT, ctx context.Context) *compute.Service
- func NewComputeServiceContextE(t testing.TestingT, ctx context.Context) (*compute.Service, error)
- func NewComputeServiceE(t testing.TestingT) (*compute.Service, error)deprecated
- func NewInstancesService(t testing.TestingT) *compute.InstancesServicedeprecated
- func NewInstancesServiceContext(t testing.TestingT, ctx context.Context) *compute.InstancesService
- func NewInstancesServiceContextE(t testing.TestingT, ctx context.Context) (*compute.InstancesService, error)
- func NewInstancesServiceE(t testing.TestingT) (*compute.InstancesService, error)deprecated
- func NewMetadata(oldMetadata *compute.Metadata, kvs map[string]string) *compute.Metadata
- func NewOSLoginServiceContextE(t testing.TestingT, ctx context.Context) (*oslogin.Service, error)
- func NewOSLoginServiceE(t testing.TestingT) (*oslogin.Service, error)deprecated
- func RandomValidGCPName() string
- func RandomValidGcpName() stringdeprecated
- func ReadBucketObject(t testing.TestingT, bucketName string, filePath string) io.Readerdeprecated
- func ReadBucketObjectContext(t testing.TestingT, ctx context.Context, bucketName string, filePath string) io.Reader
- func ReadBucketObjectContextE(t testing.TestingT, ctx context.Context, bucketName string, filePath string) (io.Reader, error)
- func ReadBucketObjectE(t testing.TestingT, bucketName string, filePath string) (io.Reader, error)deprecated
- func ReadBucketObjectWithClient(ctx context.Context, client *storage.Client, bucketName string, ...) (io.Reader, error)
- func RegionURLToRegion(regionURL string) string
- func RegionUrlToRegion(regionURL string) stringdeprecated
- func WriteBucketObject(t testing.TestingT, bucketName string, filePath string, body io.Reader, ...) stringdeprecated
- func WriteBucketObjectContext(t testing.TestingT, ctx context.Context, bucketName string, filePath string, ...) string
- func WriteBucketObjectContextE(t testing.TestingT, ctx context.Context, bucketName string, filePath string, ...) (string, error)
- func WriteBucketObjectE(t testing.TestingT, bucketName string, filePath string, body io.Reader, ...) (string, error)deprecated
- func WriteBucketObjectWithClient(ctx context.Context, client *storage.Client, bucketName string, ...) (string, error)
- func ZoneURLToZone(zoneURL string) string
- func ZoneUrlToZone(zoneURL string) stringdeprecated
- type GCRClient
- type Image
- func FetchImage(t testing.TestingT, projectID string, name string) *Imagedeprecated
- func FetchImageContext(t testing.TestingT, ctx context.Context, projectID string, name string) *Image
- func FetchImageContextE(t testing.TestingT, ctx context.Context, projectID string, name string) (*Image, error)
- func FetchImageE(t testing.TestingT, projectID string, name string) (*Image, error)deprecated
- func FetchImageWithClient(ctx context.Context, service *compute.Service, projectID string, name string) (*Image, error)
- func (i *Image) DeleteImage(t testing.TestingT)deprecated
- func (i *Image) DeleteImageContext(t testing.TestingT, ctx context.Context)
- func (i *Image) DeleteImageContextE(t testing.TestingT, ctx context.Context) error
- func (i *Image) DeleteImageE(t testing.TestingT) errordeprecated
- func (i *Image) DeleteImageWithClient(ctx context.Context, service *compute.Service) error
- type Instance
- func FetchInstance(t testing.TestingT, projectID string, name string) *Instancedeprecated
- func FetchInstanceContext(t testing.TestingT, ctx context.Context, projectID string, name string) *Instance
- func FetchInstanceContextE(t testing.TestingT, ctx context.Context, projectID string, name string) (*Instance, error)
- func FetchInstanceE(t testing.TestingT, projectID string, name string) (*Instance, error)deprecated
- func FetchInstanceWithClient(ctx context.Context, service *compute.Service, projectID string, name string) (*Instance, error)
- func (i *Instance) AddSSHKey(t testing.TestingT, username string, publicKey string)deprecated
- func (i *Instance) AddSSHKeyContext(t testing.TestingT, ctx context.Context, username string, publicKey string)
- func (i *Instance) AddSSHKeyContextE(t testing.TestingT, ctx context.Context, username string, publicKey string) error
- func (i *Instance) AddSSHKeyE(t testing.TestingT, username string, publicKey string) errordeprecated
- func (i *Instance) AddSSHKeyWithClient(ctx context.Context, service *compute.Service, username string, ...) error
- func (i *Instance) AddSshKey(t testing.TestingT, username string, publicKey string)deprecated
- func (i *Instance) AddSshKeyE(t testing.TestingT, username string, publicKey string) errordeprecated
- func (i *Instance) GetLabels(t testing.TestingT) map[string]stringdeprecated
- func (i *Instance) GetLabelsContext(t testing.TestingT, ctx context.Context) map[string]string
- func (i *Instance) GetLabelsContextE(t testing.TestingT, ctx context.Context) (map[string]string, error)
- func (i *Instance) GetLabelsE(t testing.TestingT) (map[string]string, error)deprecated
- func (i *Instance) GetMetadata(t testing.TestingT) []*compute.MetadataItemsdeprecated
- func (i *Instance) GetMetadataContext(t testing.TestingT, ctx context.Context) []*compute.MetadataItems
- func (i *Instance) GetMetadataContextE(t testing.TestingT, ctx context.Context) ([]*compute.MetadataItems, error)
- func (i *Instance) GetMetadataE(t testing.TestingT) ([]*compute.MetadataItems, error)deprecated
- func (i *Instance) GetPublicIP(t testing.TestingT) stringdeprecated
- func (i *Instance) GetPublicIPContext(t testing.TestingT, ctx context.Context) string
- func (i *Instance) GetPublicIPContextE(t testing.TestingT, ctx context.Context) (string, error)
- func (i *Instance) GetPublicIPE(t testing.TestingT) (string, error)deprecated
- func (i *Instance) GetPublicIp(t testing.TestingT) stringdeprecated
- func (i *Instance) GetPublicIpE(t testing.TestingT) (string, error)deprecated
- func (i *Instance) GetZone(t testing.TestingT) stringdeprecated
- func (i *Instance) GetZoneContext(t testing.TestingT, ctx context.Context) string
- func (i *Instance) GetZoneContextE(t testing.TestingT, ctx context.Context) (string, error)
- func (i *Instance) GetZoneE(t testing.TestingT) (string, error)deprecated
- func (i *Instance) SetLabels(t testing.TestingT, labels map[string]string)deprecated
- func (i *Instance) SetLabelsContext(t testing.TestingT, ctx context.Context, labels map[string]string)
- func (i *Instance) SetLabelsContextE(t testing.TestingT, ctx context.Context, labels map[string]string) error
- func (i *Instance) SetLabelsE(t testing.TestingT, labels map[string]string) errordeprecated
- func (i *Instance) SetLabelsWithClient(ctx context.Context, service *compute.Service, labels map[string]string) error
- func (i *Instance) SetMetadata(t testing.TestingT, metadata map[string]string)deprecated
- func (i *Instance) SetMetadataContext(t testing.TestingT, ctx context.Context, metadata map[string]string)
- func (i *Instance) SetMetadataContextE(t testing.TestingT, ctx context.Context, metadata map[string]string) error
- func (i *Instance) SetMetadataE(t testing.TestingT, metadata map[string]string) errordeprecated
- func (i *Instance) SetMetadataWithClient(ctx context.Context, service *compute.Service, metadata map[string]string) error
- type InstanceGroup
- type RegionalInstanceGroup
- func FetchRegionalInstanceGroup(t testing.TestingT, projectID string, region string, name string) *RegionalInstanceGroupdeprecated
- func FetchRegionalInstanceGroupContext(t testing.TestingT, ctx context.Context, projectID string, region string, ...) *RegionalInstanceGroup
- func FetchRegionalInstanceGroupContextE(t testing.TestingT, ctx context.Context, projectID string, region string, ...) (*RegionalInstanceGroup, error)
- func FetchRegionalInstanceGroupE(t testing.TestingT, projectID string, region string, name string) (*RegionalInstanceGroup, error)deprecated
- func FetchRegionalInstanceGroupWithClient(ctx context.Context, service *compute.Service, projectID string, region string, ...) (*RegionalInstanceGroup, error)
- func (ig *RegionalInstanceGroup) GetInstanceIDs(t testing.TestingT) []stringdeprecated
- func (ig *RegionalInstanceGroup) GetInstanceIDsContext(t testing.TestingT, ctx context.Context) []string
- func (ig *RegionalInstanceGroup) GetInstanceIDsContextE(t testing.TestingT, ctx context.Context) ([]string, error)
- func (ig *RegionalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, error)deprecated
- func (ig *RegionalInstanceGroup) GetInstanceIDsWithClient(ctx context.Context, service *compute.Service) ([]string, error)
- func (ig *RegionalInstanceGroup) GetInstanceIds(t testing.TestingT) []stringdeprecated
- func (ig *RegionalInstanceGroup) GetInstanceIdsE(t testing.TestingT) ([]string, error)deprecated
- func (ig *RegionalInstanceGroup) GetInstances(t testing.TestingT, projectID string) []*Instancedeprecated
- func (ig *RegionalInstanceGroup) GetInstancesContext(t testing.TestingT, ctx context.Context, projectID string) []*Instance
- func (ig *RegionalInstanceGroup) GetInstancesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*Instance, error)
- func (ig *RegionalInstanceGroup) GetInstancesE(t testing.TestingT, projectID string) ([]*Instance, error)deprecated
- func (ig *RegionalInstanceGroup) GetPublicIPs(t testing.TestingT, projectID string) []stringdeprecated
- func (ig *RegionalInstanceGroup) GetPublicIPsContext(t testing.TestingT, ctx context.Context, projectID string) []string
- func (ig *RegionalInstanceGroup) GetPublicIPsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
- func (ig *RegionalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func (ig *RegionalInstanceGroup) GetPublicIps(t testing.TestingT, projectID string) []stringdeprecated
- func (ig *RegionalInstanceGroup) GetPublicIpsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func (ig *RegionalInstanceGroup) GetRandomInstance(t testing.TestingT) *Instancedeprecated
- func (ig *RegionalInstanceGroup) GetRandomInstanceContext(t testing.TestingT, ctx context.Context) *Instance
- func (ig *RegionalInstanceGroup) GetRandomInstanceContextE(t testing.TestingT, ctx context.Context) (*Instance, error)
- func (ig *RegionalInstanceGroup) GetRandomInstanceE(t testing.TestingT) (*Instance, error)deprecated
- type ZonalInstanceGroup
- func FetchZonalInstanceGroup(t testing.TestingT, projectID string, zone string, name string) *ZonalInstanceGroupdeprecated
- func FetchZonalInstanceGroupContext(t testing.TestingT, ctx context.Context, projectID string, zone string, ...) *ZonalInstanceGroup
- func FetchZonalInstanceGroupContextE(t testing.TestingT, ctx context.Context, projectID string, zone string, ...) (*ZonalInstanceGroup, error)
- func FetchZonalInstanceGroupE(t testing.TestingT, projectID string, zone string, name string) (*ZonalInstanceGroup, error)deprecated
- func FetchZonalInstanceGroupWithClient(ctx context.Context, service *compute.Service, projectID string, zone string, ...) (*ZonalInstanceGroup, error)
- func (ig *ZonalInstanceGroup) GetInstanceIDs(t testing.TestingT) []stringdeprecated
- func (ig *ZonalInstanceGroup) GetInstanceIDsContext(t testing.TestingT, ctx context.Context) []string
- func (ig *ZonalInstanceGroup) GetInstanceIDsContextE(t testing.TestingT, ctx context.Context) ([]string, error)
- func (ig *ZonalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, error)deprecated
- func (ig *ZonalInstanceGroup) GetInstanceIDsWithClient(ctx context.Context, service *compute.Service) ([]string, error)
- func (ig *ZonalInstanceGroup) GetInstanceIds(t testing.TestingT) []stringdeprecated
- func (ig *ZonalInstanceGroup) GetInstanceIdsE(t testing.TestingT) ([]string, error)deprecated
- func (ig *ZonalInstanceGroup) GetInstances(t testing.TestingT, projectID string) []*Instancedeprecated
- func (ig *ZonalInstanceGroup) GetInstancesContext(t testing.TestingT, ctx context.Context, projectID string) []*Instance
- func (ig *ZonalInstanceGroup) GetInstancesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*Instance, error)
- func (ig *ZonalInstanceGroup) GetInstancesE(t testing.TestingT, projectID string) ([]*Instance, error)deprecated
- func (ig *ZonalInstanceGroup) GetPublicIPs(t testing.TestingT, projectID string) []stringdeprecated
- func (ig *ZonalInstanceGroup) GetPublicIPsContext(t testing.TestingT, ctx context.Context, projectID string) []string
- func (ig *ZonalInstanceGroup) GetPublicIPsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
- func (ig *ZonalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func (ig *ZonalInstanceGroup) GetPublicIps(t testing.TestingT, projectID string) []stringdeprecated
- func (ig *ZonalInstanceGroup) GetPublicIpsE(t testing.TestingT, projectID string) ([]string, error)deprecated
- func (ig *ZonalInstanceGroup) GetRandomInstance(t testing.TestingT) *Instancedeprecated
- func (ig *ZonalInstanceGroup) GetRandomInstanceContext(t testing.TestingT, ctx context.Context) *Instance
- func (ig *ZonalInstanceGroup) GetRandomInstanceContextE(t testing.TestingT, ctx context.Context) (*Instance, error)
- func (ig *ZonalInstanceGroup) GetRandomInstanceE(t testing.TestingT) (*Instance, error)deprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertStorageBucketExists
deprecated
AssertStorageBucketExists checks if the given storage bucket exists and fails the test if it does not.
Deprecated: Use AssertStorageBucketExistsContext instead.
func AssertStorageBucketExistsContext ¶ added in v1.0.0
AssertStorageBucketExistsContext checks if the given storage bucket exists and fails the test if it does not. The ctx parameter supports cancellation and timeouts.
func AssertStorageBucketExistsContextE ¶ added in v1.0.0
AssertStorageBucketExistsContextE checks if the given storage bucket exists and returns an error if it does not. The ctx parameter supports cancellation and timeouts.
func AssertStorageBucketExistsE
deprecated
AssertStorageBucketExistsE checks if the given storage bucket exists and returns an error if it does not.
Deprecated: Use AssertStorageBucketExistsContextE instead.
func AssertStorageBucketExistsWithClient ¶ added in v1.0.0
func AssertStorageBucketExistsWithClient(ctx context.Context, client *storage.Client, name string) error
AssertStorageBucketExistsWithClient checks if the given storage bucket exists and returns an error if it does not, using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func AssertSubscriptionExists
deprecated
added in
v1.0.0
AssertSubscriptionExists checks if the given Pub/Sub subscription exists and fails the test if it does not.
Deprecated: Use AssertSubscriptionExistsContext instead.
func AssertSubscriptionExistsContext ¶ added in v1.0.0
func AssertSubscriptionExistsContext(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string)
AssertSubscriptionExistsContext checks if the given Pub/Sub subscription exists and fails the test if it does not. The ctx parameter supports cancellation and timeouts.
func AssertSubscriptionExistsContextE ¶ added in v1.0.0
func AssertSubscriptionExistsContextE(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string) error
AssertSubscriptionExistsContextE checks if the given Pub/Sub subscription exists and returns an error if it does not. The ctx parameter supports cancellation and timeouts.
func AssertSubscriptionExistsE
deprecated
added in
v1.0.0
func AssertSubscriptionExistsWithClient ¶ added in v1.0.0
func AssertSubscriptionExistsWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string) error
AssertSubscriptionExistsWithClient checks if the given Pub/Sub subscription exists using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func AssertTopicExists
deprecated
added in
v1.0.0
AssertTopicExists checks if the given Pub/Sub topic exists and fails the test if it does not.
Deprecated: Use AssertTopicExistsContext instead.
func AssertTopicExistsContext ¶ added in v1.0.0
func AssertTopicExistsContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
AssertTopicExistsContext checks if the given Pub/Sub topic exists and fails the test if it does not. The ctx parameter supports cancellation and timeouts.
func AssertTopicExistsContextE ¶ added in v1.0.0
func AssertTopicExistsContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
AssertTopicExistsContextE checks if the given Pub/Sub topic exists and returns an error if it does not. The ctx parameter supports cancellation and timeouts.
func AssertTopicExistsE
deprecated
added in
v1.0.0
func AssertTopicExistsWithClient ¶ added in v1.0.0
func AssertTopicExistsWithClient(ctx context.Context, client *pubsub.Client, topicName string) error
AssertTopicExistsWithClient checks if the given Pub/Sub topic exists using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func CreateBuild
deprecated
added in
v0.23.4
func CreateBuild(t testing.TestingT, projectID string, build *cloudbuildpb.Build) *cloudbuildpb.Build
CreateBuild creates a new build blocking until the operation is complete. This will fail the test if there is an error.
Deprecated: Use CreateBuildContext instead.
func CreateBuildContext ¶ added in v1.0.0
func CreateBuildContext(t testing.TestingT, ctx context.Context, projectID string, build *cloudbuildpb.Build) *cloudbuildpb.Build
CreateBuildContext creates a new build blocking until the operation is complete. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func CreateBuildContextE ¶ added in v1.0.0
func CreateBuildContextE(t testing.TestingT, ctx context.Context, projectID string, build *cloudbuildpb.Build) (*cloudbuildpb.Build, error)
CreateBuildContextE creates a new build blocking until the operation is complete. The ctx parameter supports cancellation and timeouts.
func CreateBuildE
deprecated
added in
v0.23.4
func CreateBuildE(t testing.TestingT, projectID string, build *cloudbuildpb.Build) (*cloudbuildpb.Build, error)
CreateBuildE creates a new build blocking until the operation is complete.
Deprecated: Use CreateBuildContextE instead.
func CreateBuildWithClient ¶ added in v1.0.0
func CreateBuildWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, build *cloudbuildpb.Build) (*cloudbuildpb.Build, error)
CreateBuildWithClient creates a new build blocking until the operation is complete using the supplied *cloudbuild.Client. Prefer this variant in unit tests where the client is backed by a mock gRPC server. The ctx parameter supports cancellation and timeouts.
func CreateStorageBucket
deprecated
func CreateStorageBucket(t testing.TestingT, projectID string, name string, attr *storage.BucketAttrs)
CreateStorageBucket creates a Google Cloud bucket with the given BucketAttrs. Note that Google Storage bucket names must be globally unique. This will fail the test if there is an error.
Deprecated: Use CreateStorageBucketContext instead.
func CreateStorageBucketContext ¶ added in v1.0.0
func CreateStorageBucketContext(t testing.TestingT, ctx context.Context, projectID string, name string, attr *storage.BucketAttrs)
CreateStorageBucketContext creates a Google Cloud bucket with the given BucketAttrs. Note that Google Storage bucket names must be globally unique. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func CreateStorageBucketContextE ¶ added in v1.0.0
func CreateStorageBucketContextE(t testing.TestingT, ctx context.Context, projectID string, name string, attr *storage.BucketAttrs) error
CreateStorageBucketContextE creates a Google Cloud bucket with the given BucketAttrs. Note that Google Storage bucket names must be globally unique. The ctx parameter supports cancellation and timeouts.
func CreateStorageBucketE
deprecated
func CreateStorageBucketE(t testing.TestingT, projectID string, name string, attr *storage.BucketAttrs) error
CreateStorageBucketE creates a Google Cloud bucket with the given BucketAttrs. Note that Google Storage bucket names must be globally unique.
Deprecated: Use CreateStorageBucketContextE instead.
func CreateStorageBucketWithClient ¶ added in v1.0.0
func CreateStorageBucketWithClient(ctx context.Context, client *storage.Client, projectID string, name string, attr *storage.BucketAttrs) error
CreateStorageBucketWithClient creates a Google Cloud bucket with the given BucketAttrs using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func CreateSubscription
deprecated
added in
v1.0.0
func CreateSubscriptionContext ¶ added in v1.0.0
func CreateSubscriptionContext(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string, topicName string)
CreateSubscriptionContext creates a new Pub/Sub subscription on the given topic and fails the test if it cannot. The ctx parameter supports cancellation and timeouts.
func CreateSubscriptionContextE ¶ added in v1.0.0
func CreateSubscriptionContextE(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string, topicName string) error
CreateSubscriptionContextE creates a new Pub/Sub subscription on the given topic and returns an error if it fails. The ctx parameter supports cancellation and timeouts.
func CreateSubscriptionE
deprecated
added in
v1.0.0
func CreateSubscriptionWithClient ¶ added in v1.0.0
func CreateSubscriptionWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string, topicName string) error
CreateSubscriptionWithClient creates a new Pub/Sub subscription on the given topic using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func CreateTopic
deprecated
added in
v1.0.0
CreateTopic creates a new Pub/Sub topic and fails the test if it cannot.
Deprecated: Use CreateTopicContext instead.
func CreateTopicContext ¶ added in v1.0.0
func CreateTopicContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
CreateTopicContext creates a new Pub/Sub topic and fails the test if it cannot. The ctx parameter supports cancellation and timeouts.
func CreateTopicContextE ¶ added in v1.0.0
func CreateTopicContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
CreateTopicContextE creates a new Pub/Sub topic and returns an error if it fails. The ctx parameter supports cancellation and timeouts.
func CreateTopicE
deprecated
added in
v1.0.0
func CreateTopicWithClient ¶ added in v1.0.0
CreateTopicWithClient creates a new Pub/Sub topic using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func DeleteGCRImageRef
deprecated
added in
v0.23.4
DeleteGCRImageRef deletes a single repo image ref/digest. This will fail the test if there is an error.
Deprecated: Use DeleteGCRImageRefContext instead.
func DeleteGCRImageRefContext ¶ added in v1.0.0
DeleteGCRImageRefContext deletes a single repo image ref/digest. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func DeleteGCRImageRefContextE ¶ added in v1.0.0
DeleteGCRImageRefContextE deletes a single repo image ref/digest. The ctx parameter supports cancellation and timeouts.
func DeleteGCRImageRefE
deprecated
added in
v0.23.4
DeleteGCRImageRefE deletes a single repo image ref/digest.
Deprecated: Use DeleteGCRImageRefContextE instead.
func DeleteGCRImageRefWithClient ¶ added in v1.0.0
DeleteGCRImageRefWithClient deletes a single repo image ref/digest using the supplied client. Prefer this variant in unit tests where the client's Transport points at an httptest fake server (see gcr_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func DeleteGCRRepo
deprecated
added in
v0.23.4
DeleteGCRRepo deletes a GCR repository including all tagged images. This will fail the test if there is an error.
Deprecated: Use DeleteGCRRepoContext instead.
func DeleteGCRRepoContext ¶ added in v1.0.0
DeleteGCRRepoContext deletes a GCR repository including all tagged images. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func DeleteGCRRepoContextE ¶ added in v1.0.0
DeleteGCRRepoContextE deletes a GCR repository including all tagged images. The ctx parameter supports cancellation and timeouts.
func DeleteGCRRepoE
deprecated
added in
v0.23.4
DeleteGCRRepoE deletes a GCR repository including all tagged images.
Deprecated: Use DeleteGCRRepoContextE instead.
func DeleteGCRRepoWithClient ¶ added in v1.0.0
DeleteGCRRepoWithClient deletes a GCR repository including all tagged images using the supplied client. Prefer this variant in unit tests where the client's Transport points at an httptest fake server (see gcr_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func DeleteSSHKey
deprecated
added in
v0.15.7
DeleteSSHKey will delete an SSH key attached to the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key that was uploaded. This will fail the test if there is an error.
Deprecated: Use DeleteSSHKeyContext instead.
func DeleteSSHKeyContext ¶ added in v1.0.0
DeleteSSHKeyContext will delete an SSH key attached to the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key that was uploaded. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func DeleteSSHKeyContextE ¶ added in v1.0.0
DeleteSSHKeyContextE will delete an SSH key attached to the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key that was uploaded. The ctx parameter supports cancellation and timeouts.
func DeleteSSHKeyE
deprecated
added in
v0.15.7
DeleteSSHKeyE will delete an SSH key attached to the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key that was uploaded.
Deprecated: Use DeleteSSHKeyContextE instead.
func DeleteSSHKeyWithClient ¶ added in v1.0.0
DeleteSSHKeyWithClient deletes an SSH key attached to the provided user identity using the supplied *oslogin.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see oslogin_unit_test.go for the pattern). The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key that was uploaded. The ctx parameter supports cancellation and timeouts.
func DeleteStorageBucket
deprecated
DeleteStorageBucket destroys the Google Storage bucket. This will fail the test if there is an error.
Deprecated: Use DeleteStorageBucketContext instead.
func DeleteStorageBucketContext ¶ added in v1.0.0
DeleteStorageBucketContext destroys the Google Storage bucket. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func DeleteStorageBucketContextE ¶ added in v1.0.0
DeleteStorageBucketContextE destroys the Google Cloud Storage bucket with the given name. The ctx parameter supports cancellation and timeouts.
func DeleteStorageBucketE
deprecated
DeleteStorageBucketE destroys the Google Cloud Storage bucket with the given name.
Deprecated: Use DeleteStorageBucketContextE instead.
func DeleteStorageBucketWithClient ¶ added in v1.0.0
DeleteStorageBucketWithClient destroys the Google Cloud Storage bucket with the given name using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func DeleteSubscription
deprecated
added in
v1.0.0
DeleteSubscription deletes the given Pub/Sub subscription and fails the test if it cannot.
Deprecated: Use DeleteSubscriptionContext instead.
func DeleteSubscriptionContext ¶ added in v1.0.0
func DeleteSubscriptionContext(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string)
DeleteSubscriptionContext deletes the given Pub/Sub subscription and fails the test if it cannot. The ctx parameter supports cancellation and timeouts.
func DeleteSubscriptionContextE ¶ added in v1.0.0
func DeleteSubscriptionContextE(t testing.TestingT, ctx context.Context, projectID string, subscriptionName string) error
DeleteSubscriptionContextE deletes the given Pub/Sub subscription and returns an error if it fails. The ctx parameter supports cancellation and timeouts.
func DeleteSubscriptionE
deprecated
added in
v1.0.0
func DeleteSubscriptionWithClient ¶ added in v1.0.0
func DeleteSubscriptionWithClient(ctx context.Context, client *pubsub.Client, subscriptionName string) error
DeleteSubscriptionWithClient deletes the given Pub/Sub subscription using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func DeleteTopic
deprecated
added in
v1.0.0
DeleteTopic deletes the given Pub/Sub topic and fails the test if it cannot.
Deprecated: Use DeleteTopicContext instead.
func DeleteTopicContext ¶ added in v1.0.0
func DeleteTopicContext(t testing.TestingT, ctx context.Context, projectID string, topicName string)
DeleteTopicContext deletes the given Pub/Sub topic and fails the test if it cannot. The ctx parameter supports cancellation and timeouts.
func DeleteTopicContextE ¶ added in v1.0.0
func DeleteTopicContextE(t testing.TestingT, ctx context.Context, projectID string, topicName string) error
DeleteTopicContextE deletes the given Pub/Sub topic and returns an error if it fails. The ctx parameter supports cancellation and timeouts.
func DeleteTopicE
deprecated
added in
v1.0.0
func DeleteTopicWithClient ¶ added in v1.0.0
DeleteTopicWithClient deletes the given Pub/Sub topic using the supplied *pubsub.Client. Prefer this variant in unit tests where the client is backed by a pstest in-memory fake server (see pubsub_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func EmptyStorageBucket
deprecated
EmptyStorageBucket removes the contents of a storage bucket with the given name. This will fail the test if there is an error.
Deprecated: Use EmptyStorageBucketContext instead.
func EmptyStorageBucketContext ¶ added in v1.0.0
EmptyStorageBucketContext removes the contents of a storage bucket with the given name. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func EmptyStorageBucketContextE ¶ added in v1.0.0
EmptyStorageBucketContextE removes the contents of a storage bucket with the given name. The ctx parameter supports cancellation and timeouts.
func EmptyStorageBucketE
deprecated
EmptyStorageBucketE removes the contents of a storage bucket with the given name.
Deprecated: Use EmptyStorageBucketContextE instead.
func EmptyStorageBucketWithClient ¶ added in v1.0.0
EmptyStorageBucketWithClient removes the contents of a storage bucket with the given name using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func GetAllGCPRegions
deprecated
added in
v1.0.0
GetAllGCPRegions gets the list of GCP regions available in this account. This will fail the test if there is an error.
Deprecated: Use GetAllGCPRegionsContext instead.
func GetAllGCPRegionsContext ¶ added in v1.0.0
GetAllGCPRegionsContext gets the list of GCP regions available in this account. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetAllGCPRegionsContextE ¶ added in v1.0.0
func GetAllGCPRegionsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
GetAllGCPRegionsContextE gets the list of GCP regions available in this account. The ctx parameter supports cancellation and timeouts.
func GetAllGCPRegionsE
deprecated
added in
v1.0.0
func GetAllGCPRegionsWithClient ¶ added in v1.0.0
func GetAllGCPRegionsWithClient(ctx context.Context, service *compute.Service, projectID string) ([]string, error)
GetAllGCPRegionsWithClient gets the list of GCP regions available in this account using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see region_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func GetAllGCPZones
deprecated
added in
v1.0.0
GetAllGCPZones gets the list of GCP Zones available in this account. This will fail the test if there is an error.
Deprecated: Use GetAllGCPZonesContext instead.
func GetAllGCPZonesContext ¶ added in v1.0.0
GetAllGCPZonesContext gets the list of GCP Zones available in this account. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetAllGCPZonesContextE ¶ added in v1.0.0
func GetAllGCPZonesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
GetAllGCPZonesContextE gets the list of GCP Zones available in this account. The ctx parameter supports cancellation and timeouts.
func GetAllGCPZonesE
deprecated
added in
v1.0.0
func GetAllGCPZonesWithClient ¶ added in v1.0.0
func GetAllGCPZonesWithClient(ctx context.Context, service *compute.Service, projectID string) ([]string, error)
GetAllGCPZonesWithClient gets the list of GCP Zones available in this account using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see region_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func GetAllGcpRegions
deprecated
GetAllGcpRegions gets the list of GCP regions available in this account. This will fail the test if there is an error.
Deprecated: Use GetAllGCPRegionsContext instead.
func GetAllGcpRegionsContext
deprecated
added in
v1.0.0
GetAllGcpRegionsContext gets the list of GCP regions available in this account. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
Deprecated: Use GetAllGCPRegionsContext instead.
func GetAllGcpRegionsContextE
deprecated
added in
v1.0.0
func GetAllGcpRegionsE
deprecated
func GetAllGcpZones
deprecated
GetAllGcpZones gets the list of GCP Zones available in this account. This will fail the test if there is an error.
Deprecated: Use GetAllGCPZonesContext instead.
func GetAllGcpZonesContext
deprecated
added in
v1.0.0
GetAllGcpZonesContext gets the list of GCP Zones available in this account. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
Deprecated: Use GetAllGCPZonesContext instead.
func GetAllGcpZonesContextE
deprecated
added in
v1.0.0
func GetAllGcpZonesE
deprecated
func GetBuild
deprecated
added in
v0.23.4
GetBuild gets the given build. This will fail the test if there is an error.
Deprecated: Use GetBuildContext instead.
func GetBuildContext ¶ added in v1.0.0
func GetBuildContext(t testing.TestingT, ctx context.Context, projectID string, buildID string) *cloudbuildpb.Build
GetBuildContext gets the given build. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetBuildContextE ¶ added in v1.0.0
func GetBuildContextE(t testing.TestingT, ctx context.Context, projectID string, buildID string) (*cloudbuildpb.Build, error)
GetBuildContextE gets the given build. The ctx parameter supports cancellation and timeouts.
func GetBuildE
deprecated
added in
v0.23.4
GetBuildE gets the given build.
Deprecated: Use GetBuildContextE instead.
func GetBuildWithClient ¶ added in v1.0.0
func GetBuildWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, buildID string) (*cloudbuildpb.Build, error)
GetBuildWithClient gets the given build using the supplied *cloudbuild.Client. Prefer this variant in unit tests where the client is backed by a mock gRPC server. The ctx parameter supports cancellation and timeouts.
func GetBuilds
deprecated
added in
v0.23.4
func GetBuilds(t testing.TestingT, projectID string) []*cloudbuildpb.Build
GetBuilds gets the list of builds for a given project. This will fail the test if there is an error.
Deprecated: Use GetBuildsContext instead.
func GetBuildsContext ¶ added in v1.0.0
func GetBuildsContext(t testing.TestingT, ctx context.Context, projectID string) []*cloudbuildpb.Build
GetBuildsContext gets the list of builds for a given project. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetBuildsContextE ¶ added in v1.0.0
func GetBuildsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*cloudbuildpb.Build, error)
GetBuildsContextE gets the list of builds for a given project. The ctx parameter supports cancellation and timeouts.
func GetBuildsE
deprecated
added in
v0.23.4
GetBuildsE gets the list of builds for a given project.
Deprecated: Use GetBuildsContextE instead.
func GetBuildsForTrigger
deprecated
added in
v0.23.4
func GetBuildsForTrigger(t testing.TestingT, projectID string, triggerID string) []*cloudbuildpb.Build
GetBuildsForTrigger gets a list of builds for a specific cloud build trigger. This will fail the test if there is an error.
Deprecated: Use GetBuildsForTriggerContext instead.
func GetBuildsForTriggerContext ¶ added in v1.0.0
func GetBuildsForTriggerContext(t testing.TestingT, ctx context.Context, projectID string, triggerID string) []*cloudbuildpb.Build
GetBuildsForTriggerContext gets a list of builds for a specific cloud build trigger. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetBuildsForTriggerContextE ¶ added in v1.0.0
func GetBuildsForTriggerContextE(t testing.TestingT, ctx context.Context, projectID string, triggerID string) ([]*cloudbuildpb.Build, error)
GetBuildsForTriggerContextE gets a list of builds for a specific cloud build trigger. The ctx parameter supports cancellation and timeouts.
func GetBuildsForTriggerE
deprecated
added in
v0.23.4
func GetBuildsForTriggerE(t testing.TestingT, projectID string, triggerID string) ([]*cloudbuildpb.Build, error)
GetBuildsForTriggerE gets a list of builds for a specific cloud build trigger.
Deprecated: Use GetBuildsForTriggerContextE instead.
func GetBuildsForTriggerWithClient ¶ added in v1.0.0
func GetBuildsForTriggerWithClient(ctx context.Context, service *cloudbuild.Client, projectID string, triggerID string) ([]*cloudbuildpb.Build, error)
GetBuildsForTriggerWithClient gets a list of builds for a specific cloud build trigger using the supplied *cloudbuild.Client. Prefer this variant in unit tests where the client is backed by a mock gRPC server. The ctx parameter supports cancellation and timeouts.
func GetBuildsWithClient ¶ added in v1.0.0
func GetBuildsWithClient(ctx context.Context, service *cloudbuild.Client, projectID string) ([]*cloudbuildpb.Build, error)
GetBuildsWithClient gets the list of builds for a given project using the supplied *cloudbuild.Client. Prefer this variant in unit tests where the client is backed by a mock gRPC server. The ctx parameter supports cancellation and timeouts.
func GetGoogleCredentialsFromEnvVar ¶
GetGoogleCredentialsFromEnvVar returns the Credentials for use with testing.
func GetGoogleIdentityEmailEnvVar ¶ added in v0.14.4
GetGoogleIdentityEmailEnvVar returns a Google identity (user) for use with testing.
func GetGoogleProjectIDFromEnvVar ¶
GetGoogleProjectIDFromEnvVar returns the Project Id for use with testing.
func GetGoogleRegionFromEnvVar ¶
GetGoogleRegionFromEnvVar returns the Region for use with testing.
func GetLoginProfile
deprecated
added in
v0.14.4
func GetLoginProfile(t testing.TestingT, user string) *oslogin.LoginProfile
GetLoginProfile will retrieve the login profile for a user's Google identity. The login profile is a combination of OS Login + gcloud SSH keys and POSIX accounts the user will appear as. Generally, this will only be the OS Login key + account, but gcloud compute ssh could create temporary keys and profiles. The user parameter should be the email address of the user. This will fail the test if there is an error.
Deprecated: Use GetLoginProfileContext instead.
func GetLoginProfileContext ¶ added in v1.0.0
func GetLoginProfileContext(t testing.TestingT, ctx context.Context, user string) *oslogin.LoginProfile
GetLoginProfileContext will retrieve the login profile for a user's Google identity. The login profile is a combination of OS Login + gcloud SSH keys and POSIX accounts the user will appear as. Generally, this will only be the OS Login key + account, but gcloud compute ssh could create temporary keys and profiles. The user parameter should be the email address of the user. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetLoginProfileContextE ¶ added in v1.0.0
func GetLoginProfileContextE(t testing.TestingT, ctx context.Context, user string) (*oslogin.LoginProfile, error)
GetLoginProfileContextE will retrieve the login profile for a user's Google identity. The login profile is a combination of OS Login + gcloud SSH keys and POSIX accounts the user will appear as. Generally, this will only be the OS Login key + account, but gcloud compute ssh could create temporary keys and profiles. The user parameter should be the email address of the user. The ctx parameter supports cancellation and timeouts.
func GetLoginProfileE
deprecated
added in
v0.14.4
GetLoginProfileE will retrieve the login profile for a user's Google identity. The login profile is a combination of OS Login + gcloud SSH keys and POSIX accounts the user will appear as. Generally, this will only be the OS Login key + account, but gcloud compute ssh could create temporary keys and profiles. The user parameter should be the email address of the user.
Deprecated: Use GetLoginProfileContextE instead.
func GetLoginProfileWithClient ¶ added in v1.0.0
func GetLoginProfileWithClient(ctx context.Context, service *oslogin.Service, user string) (*oslogin.LoginProfile, error)
GetLoginProfileWithClient retrieves the login profile for a user's Google identity using the supplied *oslogin.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see oslogin_unit_test.go for the pattern). The user parameter should be the email address of the user. The ctx parameter supports cancellation and timeouts.
func GetRandomRegion
deprecated
func GetRandomRegion(t testing.TestingT, projectID string, approvedRegions []string, forbiddenRegions []string) string
GetRandomRegion gets a randomly chosen GCP Region. If approvedRegions is not empty, this will be a Region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the GCP APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned Region is not in the forbiddenRegions list. This will fail the test if there is an error.
Deprecated: Use GetRandomRegionContext instead.
func GetRandomRegionContext ¶ added in v1.0.0
func GetRandomRegionContext(t testing.TestingT, ctx context.Context, projectID string, approvedRegions []string, forbiddenRegions []string) string
GetRandomRegionContext gets a randomly chosen GCP Region. If approvedRegions is not empty, this will be a Region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the GCP APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned Region is not in the forbiddenRegions list. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetRandomRegionContextE ¶ added in v1.0.0
func GetRandomRegionContextE(t testing.TestingT, ctx context.Context, projectID string, approvedRegions []string, forbiddenRegions []string) (string, error)
GetRandomRegionContextE gets a randomly chosen GCP Region. If approvedRegions is not empty, this will be a Region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the GCP APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned Region is not in the forbiddenRegions list. The ctx parameter supports cancellation and timeouts.
func GetRandomRegionE
deprecated
func GetRandomRegionE(t testing.TestingT, projectID string, approvedRegions []string, forbiddenRegions []string) (string, error)
GetRandomRegionE gets a randomly chosen GCP Region. If approvedRegions is not empty, this will be a Region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the GCP APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned Region is not in the forbiddenRegions list.
Deprecated: Use GetRandomRegionContextE instead.
func GetRandomZone
deprecated
func GetRandomZone(t testing.TestingT, projectID string, approvedZones []string, forbiddenZones []string, forbiddenRegions []string) string
GetRandomZone gets a randomly chosen GCP Zone. If approvedZones is not empty, this will be a Zone from the approvedZones list; otherwise, this method will fetch the latest list of Zones from the GCP APIs and pick one of those. If forbiddenZones is not empty, this method will make sure the returned Zone is not in the forbiddenZones list. This will fail the test if there is an error.
Deprecated: Use GetRandomZoneContext instead.
func GetRandomZoneContext ¶ added in v1.0.0
func GetRandomZoneContext(t testing.TestingT, ctx context.Context, projectID string, approvedZones []string, forbiddenZones []string, forbiddenRegions []string) string
GetRandomZoneContext gets a randomly chosen GCP Zone. If approvedZones is not empty, this will be a Zone from the approvedZones list; otherwise, this method will fetch the latest list of Zones from the GCP APIs and pick one of those. If forbiddenZones is not empty, this method will make sure the returned Zone is not in the forbiddenZones list. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetRandomZoneContextE ¶ added in v1.0.0
func GetRandomZoneContextE(t testing.TestingT, ctx context.Context, projectID string, approvedZones []string, forbiddenZones []string, forbiddenRegions []string) (string, error)
GetRandomZoneContextE gets a randomly chosen GCP Zone. If approvedZones is not empty, this will be a Zone from the approvedZones list; otherwise, this method will fetch the latest list of Zones from the GCP APIs and pick one of those. If forbiddenZones is not empty, this method will make sure the returned Zone is not in the forbiddenZones list. The ctx parameter supports cancellation and timeouts.
func GetRandomZoneE
deprecated
func GetRandomZoneE(t testing.TestingT, projectID string, approvedZones []string, forbiddenZones []string, forbiddenRegions []string) (string, error)
GetRandomZoneE gets a randomly chosen GCP Zone. If approvedZones is not empty, this will be a Zone from the approvedZones list; otherwise, this method will fetch the latest list of Zones from the GCP APIs and pick one of those. If forbiddenZones is not empty, this method will make sure the returned Zone is not in the forbiddenZones list.
Deprecated: Use GetRandomZoneContextE instead.
func GetRandomZoneForRegion
deprecated
added in
v0.11.0
func GetRandomZoneForRegionContext ¶ added in v1.0.0
func GetRandomZoneForRegionContext(t testing.TestingT, ctx context.Context, projectID string, region string) string
GetRandomZoneForRegionContext gets a randomly chosen GCP Zone in the given Region. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func GetRandomZoneForRegionContextE ¶ added in v1.0.0
func GetRandomZoneForRegionContextE(t testing.TestingT, ctx context.Context, projectID string, region string) (string, error)
GetRandomZoneForRegionContextE gets a randomly chosen GCP Zone in the given Region. The ctx parameter supports cancellation and timeouts.
func GetRandomZoneForRegionE
deprecated
added in
v0.11.0
func ImportProjectSSHKey
deprecated
added in
v0.48.2
ImportProjectSSHKey will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. The projectID parameter should be the chosen project ID. This will fail the test if there is an error.
Deprecated: Use ImportProjectSSHKeyContext instead.
func ImportProjectSSHKeyContext ¶ added in v1.0.0
func ImportProjectSSHKeyContext(t testing.TestingT, ctx context.Context, user, key, projectID string)
ImportProjectSSHKeyContext will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. The projectID parameter should be the chosen project ID. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func ImportProjectSSHKeyContextE ¶ added in v1.0.0
func ImportProjectSSHKeyContextE(t testing.TestingT, ctx context.Context, user, key, projectID string) error
ImportProjectSSHKeyContextE will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. The projectID parameter should be the chosen project ID. The ctx parameter supports cancellation and timeouts.
func ImportProjectSSHKeyE
deprecated
added in
v0.48.2
ImportProjectSSHKeyE will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. The projectID parameter should be the chosen project ID.
Deprecated: Use ImportProjectSSHKeyContextE instead.
func ImportProjectSSHKeyWithClient ¶ added in v1.0.0
func ImportProjectSSHKeyWithClient(ctx context.Context, service *oslogin.Service, user, key, projectID string) error
ImportProjectSSHKeyWithClient imports an SSH key to GCP under the provided user identity, scoped to projectID, using the supplied *oslogin.Service. The ctx parameter supports cancellation and timeouts.
func ImportSSHKey
deprecated
added in
v0.14.4
ImportSSHKey will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. This will fail the test if there is an error.
Deprecated: Use ImportSSHKeyContext instead.
func ImportSSHKeyContext ¶ added in v1.0.0
ImportSSHKeyContext will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func ImportSSHKeyContextE ¶ added in v1.0.0
ImportSSHKeyContextE will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded. The ctx parameter supports cancellation and timeouts.
func ImportSSHKeyE
deprecated
added in
v0.14.4
ImportSSHKeyE will import an SSH key to GCP under the provided user identity. The user parameter should be the email address of the user. The key parameter should be the public key of the SSH key being uploaded.
Deprecated: Use ImportSSHKeyContextE instead.
func ImportSSHKeyWithClient ¶ added in v1.0.0
ImportSSHKeyWithClient imports an SSH key to GCP under the provided user identity using the supplied *oslogin.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see oslogin_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func NewCloudBuildService
deprecated
added in
v0.23.4
func NewCloudBuildService(t testing.TestingT) *cloudbuild.Client
NewCloudBuildService creates a new Cloud Build service, which is used to make Cloud Build API calls. This will fail the test if there is an error.
Deprecated: Use NewCloudBuildServiceContext instead.
func NewCloudBuildServiceContext ¶ added in v1.0.0
NewCloudBuildServiceContext creates a new Cloud Build service, which is used to make Cloud Build API calls. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func NewCloudBuildServiceContextE ¶ added in v1.0.0
func NewCloudBuildServiceContextE(t testing.TestingT, ctx context.Context) (*cloudbuild.Client, error)
NewCloudBuildServiceContextE creates a new Cloud Build service, which is used to make Cloud Build API calls. The ctx parameter supports cancellation and timeouts.
func NewCloudBuildServiceE
deprecated
added in
v0.23.4
func NewCloudBuildServiceE(t testing.TestingT) (*cloudbuild.Client, error)
NewCloudBuildServiceE creates a new Cloud Build service, which is used to make Cloud Build API calls.
Deprecated: Use NewCloudBuildServiceContextE instead.
func NewComputeService
deprecated
NewComputeService creates a new Compute service, which is used to make GCE API calls. This will fail the test if there is an error.
Deprecated: Use NewComputeServiceContext instead.
func NewComputeServiceContext ¶ added in v1.0.0
NewComputeServiceContext creates a new Compute service, which is used to make GCE API calls. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func NewComputeServiceContextE ¶ added in v1.0.0
NewComputeServiceContextE creates a new Compute service, which is used to make GCE API calls. The ctx parameter supports cancellation and timeouts.
func NewComputeServiceE
deprecated
func NewInstancesService
deprecated
added in
v0.13.3
func NewInstancesService(t testing.TestingT) *compute.InstancesService
NewInstancesService creates a new InstancesService, which is used to make a subset of GCE API calls. This will fail the test if there is an error.
Deprecated: Use NewInstancesServiceContext instead.
func NewInstancesServiceContext ¶ added in v1.0.0
NewInstancesServiceContext creates a new InstancesService, which is used to make a subset of GCE API calls. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func NewInstancesServiceContextE ¶ added in v1.0.0
func NewInstancesServiceContextE(t testing.TestingT, ctx context.Context) (*compute.InstancesService, error)
NewInstancesServiceContextE creates a new InstancesService, which is used to make a subset of GCE API calls. The ctx parameter supports cancellation and timeouts.
func NewInstancesServiceE
deprecated
added in
v0.13.3
func NewInstancesServiceE(t testing.TestingT) (*compute.InstancesService, error)
NewInstancesServiceE creates a new InstancesService, which is used to make a subset of GCE API calls.
Deprecated: Use NewInstancesServiceContextE instead.
func NewMetadata ¶ added in v1.0.0
NewMetadata merges new key-value pairs into existing metadata, preserving unmodified items.
func NewOSLoginServiceContextE ¶ added in v1.0.0
NewOSLoginServiceContextE creates a new OS Login service, which is used to make OS Login API calls. The ctx parameter supports cancellation and timeouts.
func NewOSLoginServiceE
deprecated
added in
v0.14.4
func RandomValidGCPName ¶ added in v1.0.0
func RandomValidGCPName() string
RandomValidGCPName returns a random, valid name for GCP resources. Many resources in GCP require lowercase letters only.
func RandomValidGcpName
deprecated
added in
v0.13.3
func RandomValidGcpName() string
RandomValidGcpName returns a random, valid name for GCP resources. Many resources in GCP require lowercase letters only.
Deprecated: Use RandomValidGCPName instead.
func ReadBucketObject
deprecated
func ReadBucketObjectContext ¶ added in v1.0.0
func ReadBucketObjectContext(t testing.TestingT, ctx context.Context, bucketName string, filePath string) io.Reader
ReadBucketObjectContext reads an object from the given Storage Bucket and returns its contents. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func ReadBucketObjectContextE ¶ added in v1.0.0
func ReadBucketObjectContextE(t testing.TestingT, ctx context.Context, bucketName string, filePath string) (io.Reader, error)
ReadBucketObjectContextE reads an object from the given Storage Bucket and returns its contents. The ctx parameter supports cancellation and timeouts.
func ReadBucketObjectE
deprecated
func ReadBucketObjectWithClient ¶ added in v1.0.0
func ReadBucketObjectWithClient(ctx context.Context, client *storage.Client, bucketName string, filePath string) (io.Reader, error)
ReadBucketObjectWithClient reads an object from the given Storage Bucket and returns its contents using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func RegionURLToRegion ¶ added in v1.0.0
RegionURLToRegion extracts the region name from a GCP Region URL formatted like https://www.googleapis.com/compute/v1/projects/project-123456/regions/southamerica-east1 and returns "southamerica-east1".
func RegionUrlToRegion
deprecated
added in
v0.11.0
RegionUrlToRegion extracts the region name from a GCP Region URL.
Deprecated: Use RegionURLToRegion instead.
func WriteBucketObject
deprecated
func WriteBucketObject(t testing.TestingT, bucketName string, filePath string, body io.Reader, contentType string) string
WriteBucketObject writes an object to the given Storage Bucket and returns its URL. This will fail the test if there is an error.
Deprecated: Use WriteBucketObjectContext instead.
func WriteBucketObjectContext ¶ added in v1.0.0
func WriteBucketObjectContext(t testing.TestingT, ctx context.Context, bucketName string, filePath string, body io.Reader, contentType string) string
WriteBucketObjectContext writes an object to the given Storage Bucket and returns its URL. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func WriteBucketObjectContextE ¶ added in v1.0.0
func WriteBucketObjectContextE(t testing.TestingT, ctx context.Context, bucketName string, filePath string, body io.Reader, contentType string) (string, error)
WriteBucketObjectContextE writes an object to the given Storage Bucket and returns its URL. The ctx parameter supports cancellation and timeouts.
func WriteBucketObjectE
deprecated
func WriteBucketObjectWithClient ¶ added in v1.0.0
func WriteBucketObjectWithClient(ctx context.Context, client *storage.Client, bucketName string, filePath string, body io.Reader, contentType string) (string, error)
WriteBucketObjectWithClient writes an object to the given Storage Bucket and returns its URL using the supplied *storage.Client. Prefer this variant in unit tests where the client is backed by an httptest fake server (see storage_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func ZoneURLToZone ¶ added in v1.0.0
ZoneURLToZone extracts the zone name from a GCP Zone URL formatted like https://www.googleapis.com/compute/v1/projects/project-123456/zones/asia-east1-b and returns "asia-east1-b".
func ZoneUrlToZone
deprecated
added in
v0.11.0
ZoneUrlToZone extracts the zone name from a GCP Zone URL.
Deprecated: Use ZoneURLToZone instead.
Types ¶
type GCRClient ¶ added in v1.0.0
type GCRClient struct {
Authenticator authn.Authenticator
Transport http.RoundTripper
}
GCRClient bundles the credentials and transport the go-containerregistry library needs. It exists so that GCR helpers can follow terratest's (ctx, client, ...args) WithClient convention instead of exposing the two pieces separately. Transport is optional — nil uses the library default.
type Image ¶ added in v0.11.0
Image represents a GCP Image (https://cloud.google.com/compute/docs/images).
func FetchImage
deprecated
added in
v0.11.0
func FetchImageContext ¶ added in v1.0.0
func FetchImageContext(t testing.TestingT, ctx context.Context, projectID string, name string) *Image
FetchImageContext queries GCP to return a new instance of the Compute Image type. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func FetchImageContextE ¶ added in v1.0.0
func FetchImageContextE(t testing.TestingT, ctx context.Context, projectID string, name string) (*Image, error)
FetchImageContextE queries GCP to return a new instance of the Compute Image type. The ctx parameter supports cancellation and timeouts.
func FetchImageE
deprecated
added in
v0.11.0
func FetchImageWithClient ¶ added in v1.0.0
func FetchImageWithClient(ctx context.Context, service *compute.Service, projectID string, name string) (*Image, error)
FetchImageWithClient queries GCP to return a new instance of the Compute Image type using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*Image) DeleteImage
deprecated
added in
v0.11.0
DeleteImage deletes the given Compute Image. This will fail the test if there is an error.
Deprecated: Use Image.DeleteImageContext instead.
func (*Image) DeleteImageContext ¶ added in v1.0.0
DeleteImageContext deletes the given Compute Image. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*Image) DeleteImageContextE ¶ added in v1.0.0
DeleteImageContextE deletes the given Compute Image. The ctx parameter supports cancellation and timeouts.
func (*Image) DeleteImageE
deprecated
added in
v0.11.0
DeleteImageE deletes the given Compute Image.
Deprecated: Use Image.DeleteImageContextE instead.
func (*Image) DeleteImageWithClient ¶ added in v1.0.0
DeleteImageWithClient deletes the given Compute Image using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
type Instance ¶ added in v0.11.0
Instance represents a GCP Compute Instance (https://cloud.google.com/compute/docs/instances/).
func FetchInstance
deprecated
added in
v0.11.0
func FetchInstanceContext ¶ added in v1.0.0
func FetchInstanceContext(t testing.TestingT, ctx context.Context, projectID string, name string) *Instance
FetchInstanceContext queries GCP to return an instance of the Compute Instance type. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func FetchInstanceContextE ¶ added in v1.0.0
func FetchInstanceContextE(t testing.TestingT, ctx context.Context, projectID string, name string) (*Instance, error)
FetchInstanceContextE queries GCP to return an instance of the Compute Instance type. The ctx parameter supports cancellation and timeouts.
func FetchInstanceE
deprecated
added in
v0.11.0
func FetchInstanceWithClient ¶ added in v1.0.0
func FetchInstanceWithClient(ctx context.Context, service *compute.Service, projectID string, name string) (*Instance, error)
FetchInstanceWithClient queries GCP to return an instance of the Compute Instance type using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*Instance) AddSSHKey
deprecated
added in
v1.0.0
func (*Instance) AddSSHKeyContext ¶ added in v1.0.0
func (i *Instance) AddSSHKeyContext(t testing.TestingT, ctx context.Context, username string, publicKey string)
AddSSHKeyContext adds the given public SSH key to the Compute Instance. Users can SSH in with the given username. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*Instance) AddSSHKeyContextE ¶ added in v1.0.0
func (i *Instance) AddSSHKeyContextE(t testing.TestingT, ctx context.Context, username string, publicKey string) error
AddSSHKeyContextE adds the given public SSH key to the Compute Instance. Users can SSH in with the given username. The ctx parameter supports cancellation and timeouts.
func (*Instance) AddSSHKeyE
deprecated
added in
v1.0.0
func (*Instance) AddSSHKeyWithClient ¶ added in v1.0.0
func (i *Instance) AddSSHKeyWithClient(ctx context.Context, service *compute.Service, username string, publicKey string) error
AddSSHKeyWithClient adds the given public SSH key to the Compute Instance using the supplied *compute.Service. Users can SSH in with the given username. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*Instance) AddSshKey
deprecated
added in
v0.13.3
func (*Instance) AddSshKeyE
deprecated
added in
v0.13.3
func (*Instance) GetLabelsContext ¶ added in v1.0.0
GetLabelsContext returns all the tags for the given Compute Instance. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetLabelsContextE ¶ added in v1.0.0
func (i *Instance) GetLabelsContextE(t testing.TestingT, ctx context.Context) (map[string]string, error)
GetLabelsContextE returns all the tags for the given Compute Instance. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetLabelsE
deprecated
added in
v1.0.0
func (*Instance) GetMetadata
deprecated
added in
v0.13.3
func (i *Instance) GetMetadata(t testing.TestingT) []*compute.MetadataItems
GetMetadata gets the given Compute Instance's metadata.
Deprecated: Use Instance.GetMetadataContext instead.
func (*Instance) GetMetadataContext ¶ added in v1.0.0
func (i *Instance) GetMetadataContext(t testing.TestingT, ctx context.Context) []*compute.MetadataItems
GetMetadataContext gets the given Compute Instance's metadata. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetMetadataContextE ¶ added in v1.0.0
func (i *Instance) GetMetadataContextE(t testing.TestingT, ctx context.Context) ([]*compute.MetadataItems, error)
GetMetadataContextE gets the given Compute Instance's metadata. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetMetadataE
deprecated
added in
v1.0.0
GetMetadataE gets the given Compute Instance's metadata.
Deprecated: Use Instance.GetMetadataContextE instead.
func (*Instance) GetPublicIP
deprecated
added in
v1.0.0
GetPublicIP gets the public IP address of the given Compute Instance. This will fail the test if there is an error.
Deprecated: Use Instance.GetPublicIPContext instead.
func (*Instance) GetPublicIPContext ¶ added in v1.0.0
GetPublicIPContext gets the public IP address of the given Compute Instance. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetPublicIPContextE ¶ added in v1.0.0
GetPublicIPContextE gets the public IP address of the given Compute Instance. The ctx parameter supports cancellation and timeouts. Returns an error (rather than panicking) when the instance has no network interfaces or the first interface has no accessConfigs — both indicate the instance has no external internet access (https://cloud.google.com/compute/docs/reference/rest/v1/instances).
func (*Instance) GetPublicIPE
deprecated
added in
v1.0.0
func (*Instance) GetPublicIp
deprecated
added in
v0.11.0
GetPublicIp gets the public IP address of the given Compute Instance. This will fail the test if there is an error.
Deprecated: Use Instance.GetPublicIP instead.
func (*Instance) GetPublicIpE
deprecated
added in
v0.11.0
func (*Instance) GetZoneContext ¶ added in v1.0.0
GetZoneContext returns the Zone in which the Compute Instance is located. The ctx parameter supports cancellation and timeouts.
func (*Instance) GetZoneContextE ¶ added in v1.0.0
GetZoneContextE returns the Zone in which the Compute Instance is located. The ctx parameter supports cancellation and timeouts.
func (*Instance) SetLabelsContext ¶ added in v1.0.0
func (i *Instance) SetLabelsContext(t testing.TestingT, ctx context.Context, labels map[string]string)
SetLabelsContext adds the tags to the given Compute Instance. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*Instance) SetLabelsContextE ¶ added in v1.0.0
func (i *Instance) SetLabelsContextE(t testing.TestingT, ctx context.Context, labels map[string]string) error
SetLabelsContextE adds the tags to the given Compute Instance. The ctx parameter supports cancellation and timeouts.
func (*Instance) SetLabelsE
deprecated
added in
v0.11.0
func (*Instance) SetLabelsWithClient ¶ added in v1.0.0
func (i *Instance) SetLabelsWithClient(ctx context.Context, service *compute.Service, labels map[string]string) error
SetLabelsWithClient merges the given labels into the instance's existing labels using the supplied *compute.Service. Keys present in labels overwrite existing values; other labels are preserved. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*Instance) SetMetadata
deprecated
added in
v0.13.3
func (*Instance) SetMetadataContext ¶ added in v1.0.0
func (i *Instance) SetMetadataContext(t testing.TestingT, ctx context.Context, metadata map[string]string)
SetMetadataContext sets the given Compute Instance's metadata. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*Instance) SetMetadataContextE ¶ added in v1.0.0
func (i *Instance) SetMetadataContextE(t testing.TestingT, ctx context.Context, metadata map[string]string) error
SetMetadataContextE adds the given metadata map to the existing metadata of the given Compute Instance. The ctx parameter supports cancellation and timeouts.
func (*Instance) SetMetadataE
deprecated
added in
v0.13.3
func (*Instance) SetMetadataWithClient ¶ added in v1.0.0
func (i *Instance) SetMetadataWithClient(ctx context.Context, service *compute.Service, metadata map[string]string) error
SetMetadataWithClient adds the given metadata map to the existing metadata of the given Compute Instance using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
type InstanceGroup ¶ added in v0.11.0
type InstanceGroup interface {
// GetInstanceIDs gets the IDs of Instances in the given Instance Group.
// This will fail the test if there is an error.
GetInstanceIDs(t testing.TestingT) []string
// GetInstanceIDsE gets the IDs of Instances in the given Instance Group.
GetInstanceIDsE(t testing.TestingT) ([]string, error)
// GetInstanceIDsContextE gets the IDs of Instances in the given Instance Group.
// The ctx parameter supports cancellation and timeouts.
GetInstanceIDsContextE(t testing.TestingT, ctx context.Context) ([]string, error)
// Deprecated: Use [InstanceGroup.GetInstanceIDs] instead.
GetInstanceIds(t testing.TestingT) []string //nolint:staticcheck,revive // preserving deprecated method name
// Deprecated: Use [InstanceGroup.GetInstanceIDsE] instead.
GetInstanceIdsE(t testing.TestingT) ([]string, error) //nolint:staticcheck,revive // preserving deprecated method name
}
InstanceGroup is an interface for instance groups that can return their instance IDs.
type RegionalInstanceGroup ¶ added in v0.11.0
type RegionalInstanceGroup struct {
*compute.InstanceGroup
// contains filtered or unexported fields
}
RegionalInstanceGroup represents a GCP Regional Instance Group (https://cloud.google.com/compute/docs/instance-groups/).
func FetchRegionalInstanceGroup
deprecated
added in
v0.11.0
func FetchRegionalInstanceGroup(t testing.TestingT, projectID string, region string, name string) *RegionalInstanceGroup
FetchRegionalInstanceGroup queries GCP to return a new instance of the Regional Instance Group type. This will fail the test if there is an error.
Deprecated: Use FetchRegionalInstanceGroupContext instead.
func FetchRegionalInstanceGroupContext ¶ added in v1.0.0
func FetchRegionalInstanceGroupContext(t testing.TestingT, ctx context.Context, projectID string, region string, name string) *RegionalInstanceGroup
FetchRegionalInstanceGroupContext queries GCP to return a new instance of the Regional Instance Group type. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func FetchRegionalInstanceGroupContextE ¶ added in v1.0.0
func FetchRegionalInstanceGroupContextE(t testing.TestingT, ctx context.Context, projectID string, region string, name string) (*RegionalInstanceGroup, error)
FetchRegionalInstanceGroupContextE queries GCP to return a new instance of the Regional Instance Group type. The ctx parameter supports cancellation and timeouts.
func FetchRegionalInstanceGroupE
deprecated
added in
v0.11.0
func FetchRegionalInstanceGroupE(t testing.TestingT, projectID string, region string, name string) (*RegionalInstanceGroup, error)
FetchRegionalInstanceGroupE queries GCP to return a new instance of the Regional Instance Group type.
Deprecated: Use FetchRegionalInstanceGroupContextE instead.
func FetchRegionalInstanceGroupWithClient ¶ added in v1.0.0
func FetchRegionalInstanceGroupWithClient(ctx context.Context, service *compute.Service, projectID string, region string, name string) (*RegionalInstanceGroup, error)
FetchRegionalInstanceGroupWithClient queries GCP to return a new instance of the Regional Instance Group type using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstanceIDs
deprecated
added in
v1.0.0
func (ig *RegionalInstanceGroup) GetInstanceIDs(t testing.TestingT) []string
GetInstanceIDs gets the IDs of Instances in the given Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetInstanceIDsContext instead.
func (*RegionalInstanceGroup) GetInstanceIDsContext ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetInstanceIDsContext(t testing.TestingT, ctx context.Context) []string
GetInstanceIDsContext gets the IDs of Instances in the given Regional Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstanceIDsContextE ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetInstanceIDsContextE(t testing.TestingT, ctx context.Context) ([]string, error)
GetInstanceIDsContextE gets the IDs of Instances in the given Regional Instance Group. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstanceIDsE
deprecated
added in
v1.0.0
func (ig *RegionalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, error)
GetInstanceIDsE gets the IDs of Instances in the given Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetInstanceIDsContextE instead.
func (*RegionalInstanceGroup) GetInstanceIDsWithClient ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetInstanceIDsWithClient(ctx context.Context, service *compute.Service) ([]string, error)
GetInstanceIDsWithClient gets the IDs of Instances in the given Regional Instance Group using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstanceIds
deprecated
added in
v0.11.0
func (ig *RegionalInstanceGroup) GetInstanceIds(t testing.TestingT) []string
GetInstanceIds gets the IDs of Instances in the given Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetInstanceIDs instead.
func (*RegionalInstanceGroup) GetInstanceIdsE
deprecated
added in
v0.11.0
func (ig *RegionalInstanceGroup) GetInstanceIdsE(t testing.TestingT) ([]string, error)
GetInstanceIdsE gets the IDs of Instances in the given Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetInstanceIDsE instead.
func (*RegionalInstanceGroup) GetInstances
deprecated
added in
v0.13.4
func (ig *RegionalInstanceGroup) GetInstances(t testing.TestingT, projectID string) []*Instance
GetInstances returns a collection of Instance structs from the given Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetInstancesContext instead.
func (*RegionalInstanceGroup) GetInstancesContext ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetInstancesContext(t testing.TestingT, ctx context.Context, projectID string) []*Instance
GetInstancesContext returns a collection of Instance structs from the given Regional Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstancesContextE ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetInstancesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*Instance, error)
GetInstancesContextE returns a collection of Instance structs from the given Regional Instance Group. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetInstancesE
deprecated
added in
v0.13.4
func (ig *RegionalInstanceGroup) GetInstancesE(t testing.TestingT, projectID string) ([]*Instance, error)
GetInstancesE returns a collection of Instance structs from the given Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetInstancesContextE instead.
func (*RegionalInstanceGroup) GetPublicIPs
deprecated
added in
v1.0.0
func (ig *RegionalInstanceGroup) GetPublicIPs(t testing.TestingT, projectID string) []string
GetPublicIPs returns a slice of the public IPs from the given Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetPublicIPsContext instead.
func (*RegionalInstanceGroup) GetPublicIPsContext ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetPublicIPsContext(t testing.TestingT, ctx context.Context, projectID string) []string
GetPublicIPsContext returns a slice of the public IPs from the given Regional Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetPublicIPsContextE ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetPublicIPsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
GetPublicIPsContextE returns a slice of the public IPs from the given Regional Instance Group. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetPublicIPsE
deprecated
added in
v1.0.0
func (ig *RegionalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID string) ([]string, error)
GetPublicIPsE returns a slice of the public IPs from the given Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetPublicIPsContextE instead.
func (*RegionalInstanceGroup) GetPublicIps
deprecated
added in
v0.13.4
func (ig *RegionalInstanceGroup) GetPublicIps(t testing.TestingT, projectID string) []string
GetPublicIps returns a slice of the public IPs from the given Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetPublicIPs instead.
func (*RegionalInstanceGroup) GetPublicIpsE
deprecated
added in
v0.13.4
func (ig *RegionalInstanceGroup) GetPublicIpsE(t testing.TestingT, projectID string) ([]string, error)
GetPublicIpsE returns a slice of the public IPs from the given Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetPublicIPsE instead.
func (*RegionalInstanceGroup) GetRandomInstance
deprecated
added in
v0.11.0
func (ig *RegionalInstanceGroup) GetRandomInstance(t testing.TestingT) *Instance
GetRandomInstance returns a randomly selected Instance from the Regional Instance Group. This will fail the test if there is an error.
Deprecated: Use RegionalInstanceGroup.GetRandomInstanceContext instead.
func (*RegionalInstanceGroup) GetRandomInstanceContext ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetRandomInstanceContext(t testing.TestingT, ctx context.Context) *Instance
GetRandomInstanceContext returns a randomly selected Instance from the Regional Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetRandomInstanceContextE ¶ added in v1.0.0
func (ig *RegionalInstanceGroup) GetRandomInstanceContextE(t testing.TestingT, ctx context.Context) (*Instance, error)
GetRandomInstanceContextE returns a randomly selected Instance from the Regional Instance Group. The ctx parameter supports cancellation and timeouts.
func (*RegionalInstanceGroup) GetRandomInstanceE
deprecated
added in
v0.11.0
func (ig *RegionalInstanceGroup) GetRandomInstanceE(t testing.TestingT) (*Instance, error)
GetRandomInstanceE returns a randomly selected Instance from the Regional Instance Group.
Deprecated: Use RegionalInstanceGroup.GetRandomInstanceContextE instead.
type ZonalInstanceGroup ¶ added in v0.11.0
type ZonalInstanceGroup struct {
*compute.InstanceGroup
// contains filtered or unexported fields
}
ZonalInstanceGroup represents a GCP Zonal Instance Group (https://cloud.google.com/compute/docs/instance-groups/).
func FetchZonalInstanceGroup
deprecated
added in
v0.11.0
func FetchZonalInstanceGroup(t testing.TestingT, projectID string, zone string, name string) *ZonalInstanceGroup
FetchZonalInstanceGroup queries GCP to return a new instance of the Zonal Instance Group type. This will fail the test if there is an error.
Deprecated: Use FetchZonalInstanceGroupContext instead.
func FetchZonalInstanceGroupContext ¶ added in v1.0.0
func FetchZonalInstanceGroupContext(t testing.TestingT, ctx context.Context, projectID string, zone string, name string) *ZonalInstanceGroup
FetchZonalInstanceGroupContext queries GCP to return a new instance of the Zonal Instance Group type. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func FetchZonalInstanceGroupContextE ¶ added in v1.0.0
func FetchZonalInstanceGroupContextE(t testing.TestingT, ctx context.Context, projectID string, zone string, name string) (*ZonalInstanceGroup, error)
FetchZonalInstanceGroupContextE queries GCP to return a new instance of the Zonal Instance Group type. The ctx parameter supports cancellation and timeouts.
func FetchZonalInstanceGroupE
deprecated
added in
v0.11.0
func FetchZonalInstanceGroupE(t testing.TestingT, projectID string, zone string, name string) (*ZonalInstanceGroup, error)
FetchZonalInstanceGroupE queries GCP to return a new instance of the Zonal Instance Group type.
Deprecated: Use FetchZonalInstanceGroupContextE instead.
func FetchZonalInstanceGroupWithClient ¶ added in v1.0.0
func FetchZonalInstanceGroupWithClient(ctx context.Context, service *compute.Service, projectID string, zone string, name string) (*ZonalInstanceGroup, error)
FetchZonalInstanceGroupWithClient queries GCP to return a new instance of the Zonal Instance Group type using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstanceIDs
deprecated
added in
v1.0.0
func (ig *ZonalInstanceGroup) GetInstanceIDs(t testing.TestingT) []string
GetInstanceIDs gets the IDs of Instances in the given Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetInstanceIDsContext instead.
func (*ZonalInstanceGroup) GetInstanceIDsContext ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetInstanceIDsContext(t testing.TestingT, ctx context.Context) []string
GetInstanceIDsContext gets the IDs of Instances in the given Zonal Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstanceIDsContextE ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetInstanceIDsContextE(t testing.TestingT, ctx context.Context) ([]string, error)
GetInstanceIDsContextE gets the IDs of Instances in the given Zonal Instance Group. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstanceIDsE
deprecated
added in
v1.0.0
func (ig *ZonalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, error)
GetInstanceIDsE gets the IDs of Instances in the given Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetInstanceIDsContextE instead.
func (*ZonalInstanceGroup) GetInstanceIDsWithClient ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetInstanceIDsWithClient(ctx context.Context, service *compute.Service) ([]string, error)
GetInstanceIDsWithClient gets the IDs of Instances in the given Zonal Instance Group using the supplied *compute.Service. Prefer this variant in unit tests where the service is backed by an httptest fake server (see compute_unit_test.go for the pattern). The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstanceIds
deprecated
added in
v0.11.0
func (ig *ZonalInstanceGroup) GetInstanceIds(t testing.TestingT) []string
GetInstanceIds gets the IDs of Instances in the given Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetInstanceIDs instead.
func (*ZonalInstanceGroup) GetInstanceIdsE
deprecated
added in
v0.11.0
func (ig *ZonalInstanceGroup) GetInstanceIdsE(t testing.TestingT) ([]string, error)
GetInstanceIdsE gets the IDs of Instances in the given Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetInstanceIDsE instead.
func (*ZonalInstanceGroup) GetInstances
deprecated
added in
v0.13.4
func (ig *ZonalInstanceGroup) GetInstances(t testing.TestingT, projectID string) []*Instance
GetInstances returns a collection of Instance structs from the given Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetInstancesContext instead.
func (*ZonalInstanceGroup) GetInstancesContext ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetInstancesContext(t testing.TestingT, ctx context.Context, projectID string) []*Instance
GetInstancesContext returns a collection of Instance structs from the given Zonal Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstancesContextE ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetInstancesContextE(t testing.TestingT, ctx context.Context, projectID string) ([]*Instance, error)
GetInstancesContextE returns a collection of Instance structs from the given Zonal Instance Group. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetInstancesE
deprecated
added in
v0.13.4
func (ig *ZonalInstanceGroup) GetInstancesE(t testing.TestingT, projectID string) ([]*Instance, error)
GetInstancesE returns a collection of Instance structs from the given Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetInstancesContextE instead.
func (*ZonalInstanceGroup) GetPublicIPs
deprecated
added in
v1.0.0
func (ig *ZonalInstanceGroup) GetPublicIPs(t testing.TestingT, projectID string) []string
GetPublicIPs returns a slice of the public IPs from the given Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetPublicIPsContext instead.
func (*ZonalInstanceGroup) GetPublicIPsContext ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetPublicIPsContext(t testing.TestingT, ctx context.Context, projectID string) []string
GetPublicIPsContext returns a slice of the public IPs from the given Zonal Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetPublicIPsContextE ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetPublicIPsContextE(t testing.TestingT, ctx context.Context, projectID string) ([]string, error)
GetPublicIPsContextE returns a slice of the public IPs from the given Zonal Instance Group. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetPublicIPsE
deprecated
added in
v1.0.0
GetPublicIPsE returns a slice of the public IPs from the given Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetPublicIPsContextE instead.
func (*ZonalInstanceGroup) GetPublicIps
deprecated
added in
v0.13.4
func (ig *ZonalInstanceGroup) GetPublicIps(t testing.TestingT, projectID string) []string
GetPublicIps returns a slice of the public IPs from the given Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetPublicIPs instead.
func (*ZonalInstanceGroup) GetPublicIpsE
deprecated
added in
v0.13.4
GetPublicIpsE returns a slice of the public IPs from the given Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetPublicIPsE instead.
func (*ZonalInstanceGroup) GetRandomInstance
deprecated
added in
v0.11.0
func (ig *ZonalInstanceGroup) GetRandomInstance(t testing.TestingT) *Instance
GetRandomInstance returns a randomly selected Instance from the Zonal Instance Group. This will fail the test if there is an error.
Deprecated: Use ZonalInstanceGroup.GetRandomInstanceContext instead.
func (*ZonalInstanceGroup) GetRandomInstanceContext ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetRandomInstanceContext(t testing.TestingT, ctx context.Context) *Instance
GetRandomInstanceContext returns a randomly selected Instance from the Zonal Instance Group. This will fail the test if there is an error. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetRandomInstanceContextE ¶ added in v1.0.0
func (ig *ZonalInstanceGroup) GetRandomInstanceContextE(t testing.TestingT, ctx context.Context) (*Instance, error)
GetRandomInstanceContextE returns a randomly selected Instance from the Zonal Instance Group. The ctx parameter supports cancellation and timeouts.
func (*ZonalInstanceGroup) GetRandomInstanceE
deprecated
added in
v0.11.0
func (ig *ZonalInstanceGroup) GetRandomInstanceE(t testing.TestingT) (*Instance, error)
GetRandomInstanceE returns a randomly selected Instance from the Zonal Instance Group.
Deprecated: Use ZonalInstanceGroup.GetRandomInstanceContextE instead.