testutil

package
v3.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

func IntPtr

func IntPtr(i int) *int

func RandomGUID

func RandomGUID() string

func RandomName

func RandomName() string

func Setup

func Setup(mock MockRoute, t *testing.T) string

func SetupFakeAPIServer

func SetupFakeAPIServer() string

func SetupFakeUAAServer

func SetupFakeUAAServer(expiresIn int) string

func SetupMultiple

func SetupMultiple(mockEndpoints []MockRoute, t *testing.T) string

func StringPtr

func StringPtr(s string) *string

func Teardown

func Teardown()

Types

type JSONResource

type JSONResource struct {
	GUID   string
	Name   string
	JSON   string
	Params map[string]string
}

type MockRoute

type MockRoute struct {
	Method           string
	Endpoint         string
	Output           []string
	UserAgent        string
	Status           int
	Statuses         []int
	QueryString      string
	PostForm         string
	RedirectLocation string
}

type ObjectJSONGenerator

type ObjectJSONGenerator struct {
}

func NewObjectJSONGenerator

func NewObjectJSONGenerator(seed int) *ObjectJSONGenerator

func (ObjectJSONGenerator) AppEnvVar

func (o ObjectJSONGenerator) AppEnvVar() *JSONResource

func (ObjectJSONGenerator) AppEnvironment

func (o ObjectJSONGenerator) AppEnvironment() *JSONResource

func (ObjectJSONGenerator) AppEnvironmentExpected

func (o ObjectJSONGenerator) AppEnvironmentExpected(name string) *JSONResource

func (ObjectJSONGenerator) AppFeature

func (o ObjectJSONGenerator) AppFeature() *JSONResource

func (ObjectJSONGenerator) AppPermission

func (o ObjectJSONGenerator) AppPermission() *JSONResource

func (ObjectJSONGenerator) AppSSH

func (o ObjectJSONGenerator) AppSSH() *JSONResource

func (ObjectJSONGenerator) AppUpdateEnvVars

func (o ObjectJSONGenerator) AppUpdateEnvVars() *JSONResource

func (ObjectJSONGenerator) AppUsage

func (o ObjectJSONGenerator) AppUsage() *JSONResource

func (ObjectJSONGenerator) Application

func (o ObjectJSONGenerator) Application() *JSONResource

func (ObjectJSONGenerator) Array

func (o ObjectJSONGenerator) Array(resourcesJSON ...string) string

func (ObjectJSONGenerator) AuditEvent

func (o ObjectJSONGenerator) AuditEvent() *JSONResource

func (ObjectJSONGenerator) Build

func (o ObjectJSONGenerator) Build(state string) *JSONResource

func (ObjectJSONGenerator) Buildpack

func (o ObjectJSONGenerator) Buildpack() *JSONResource

func (ObjectJSONGenerator) Deployment

func (o ObjectJSONGenerator) Deployment() *JSONResource

func (ObjectJSONGenerator) Domain

func (o ObjectJSONGenerator) Domain() *JSONResource

func (ObjectJSONGenerator) DomainShared

func (o ObjectJSONGenerator) DomainShared() *JSONResource

func (ObjectJSONGenerator) Droplet

func (o ObjectJSONGenerator) Droplet() *JSONResource

func (ObjectJSONGenerator) DropletAssociation

func (o ObjectJSONGenerator) DropletAssociation() *JSONResource

func (ObjectJSONGenerator) EnvVarGroup

func (o ObjectJSONGenerator) EnvVarGroup() *JSONResource

func (ObjectJSONGenerator) FeatureFlag

func (o ObjectJSONGenerator) FeatureFlag() *JSONResource

func (ObjectJSONGenerator) IsolationSegment

func (o ObjectJSONGenerator) IsolationSegment() *JSONResource

func (ObjectJSONGenerator) IsolationSegmentRelationships

func (o ObjectJSONGenerator) IsolationSegmentRelationships() *JSONResource

func (ObjectJSONGenerator) Job

func (o ObjectJSONGenerator) Job(state string) *JSONResource

func (ObjectJSONGenerator) Manifest

func (o ObjectJSONGenerator) Manifest() *JSONResource

func (ObjectJSONGenerator) ManifestDiff

func (o ObjectJSONGenerator) ManifestDiff() *JSONResource

func (ObjectJSONGenerator) Organization

func (o ObjectJSONGenerator) Organization() *JSONResource

func (ObjectJSONGenerator) OrganizationQuota

func (o ObjectJSONGenerator) OrganizationQuota() *JSONResource

func (ObjectJSONGenerator) OrganizationUsageSummary

func (o ObjectJSONGenerator) OrganizationUsageSummary() *JSONResource

func (ObjectJSONGenerator) Package

func (o ObjectJSONGenerator) Package(state string) *JSONResource

func (ObjectJSONGenerator) PackageDocker

func (o ObjectJSONGenerator) PackageDocker() *JSONResource

func (ObjectJSONGenerator) Paged

func (o ObjectJSONGenerator) Paged(pagesOfResourcesJSON ...[]string) []string

func (ObjectJSONGenerator) PagedWithInclude

func (o ObjectJSONGenerator) PagedWithInclude(pagesOfResourcesJSON ...PagedResult) []string

PagedWithInclude takes the list of resources and inserts them into a paged API response

func (ObjectJSONGenerator) Process

func (o ObjectJSONGenerator) Process() *JSONResource

func (ObjectJSONGenerator) ProcessStats

func (o ObjectJSONGenerator) ProcessStats() *JSONResource

func (ObjectJSONGenerator) ResourceMatch

func (o ObjectJSONGenerator) ResourceMatch() *JSONResource

func (ObjectJSONGenerator) ResourceWithInclude

func (o ObjectJSONGenerator) ResourceWithInclude(rr ResourceResult) []string

ResourceWithInclude merges the included resources under the primary resource's included key

func (ObjectJSONGenerator) Revision

func (o ObjectJSONGenerator) Revision() *JSONResource

func (ObjectJSONGenerator) Role

func (ObjectJSONGenerator) Route

func (o ObjectJSONGenerator) Route() *JSONResource
func (o ObjectJSONGenerator) RouteDestinationWithLinks() *JSONResource

func (ObjectJSONGenerator) RouteDestinations

func (o ObjectJSONGenerator) RouteDestinations() *JSONResource

func (ObjectJSONGenerator) RouteSpaceRelationships

func (o ObjectJSONGenerator) RouteSpaceRelationships() *JSONResource

func (ObjectJSONGenerator) SecurityGroup

func (o ObjectJSONGenerator) SecurityGroup() *JSONResource

func (ObjectJSONGenerator) ServiceBroker

func (o ObjectJSONGenerator) ServiceBroker() *JSONResource

func (ObjectJSONGenerator) ServiceCredentialBinding

func (o ObjectJSONGenerator) ServiceCredentialBinding() *JSONResource

func (ObjectJSONGenerator) ServiceCredentialBindingDetails

func (o ObjectJSONGenerator) ServiceCredentialBindingDetails() *JSONResource

func (ObjectJSONGenerator) ServiceInstance

func (o ObjectJSONGenerator) ServiceInstance() *JSONResource

func (ObjectJSONGenerator) ServiceInstanceSpaceRelationships

func (o ObjectJSONGenerator) ServiceInstanceSpaceRelationships() *JSONResource

func (ObjectJSONGenerator) ServiceInstanceUsageSummary

func (o ObjectJSONGenerator) ServiceInstanceUsageSummary() *JSONResource

func (ObjectJSONGenerator) ServiceInstanceUserProvided

func (o ObjectJSONGenerator) ServiceInstanceUserProvided() *JSONResource

func (ObjectJSONGenerator) ServiceOffering

func (o ObjectJSONGenerator) ServiceOffering() *JSONResource

func (ObjectJSONGenerator) ServicePlan

func (o ObjectJSONGenerator) ServicePlan() *JSONResource

func (ObjectJSONGenerator) ServicePlanVisibility

func (o ObjectJSONGenerator) ServicePlanVisibility() *JSONResource

func (ObjectJSONGenerator) ServiceRouteBinding

func (o ObjectJSONGenerator) ServiceRouteBinding() *JSONResource

func (ObjectJSONGenerator) ServiceUsage

func (o ObjectJSONGenerator) ServiceUsage() *JSONResource

func (ObjectJSONGenerator) Sidecar

func (o ObjectJSONGenerator) Sidecar() *JSONResource

func (ObjectJSONGenerator) Single

func (o ObjectJSONGenerator) Single(resourceJSON string) []string

func (ObjectJSONGenerator) SinglePaged

func (o ObjectJSONGenerator) SinglePaged(resourceJSON string) []string

func (ObjectJSONGenerator) Space

func (o ObjectJSONGenerator) Space() *JSONResource

func (ObjectJSONGenerator) SpaceQuota

func (o ObjectJSONGenerator) SpaceQuota() *JSONResource

func (ObjectJSONGenerator) Stack

func (o ObjectJSONGenerator) Stack() *JSONResource

func (ObjectJSONGenerator) Task

func (ObjectJSONGenerator) User

type PagedResult

type PagedResult struct {
	Resources []string

	// extra included resources
	// https://v3-apidocs.cloudfoundry.org/version/3.127.0/index.html#resources-with-includes
	Apps             []string
	Spaces           []string
	Organizations    []string
	Domains          []string
	Users            []string
	ServiceOfferings []string
	ServiceInstances []string
	Routes           []string
}

type ResourceResult

type ResourceResult struct {
	Resource string

	// extra included resources
	// https://v3-apidocs.cloudfoundry.org/version/3.127.0/index.html#resources-with-includes
	Apps             []string
	Spaces           []string
	Organizations    []string
	Domains          []string
	Users            []string
	ServiceOfferings []string
	ServiceInstances []string
	Routes           []string
}

Jump to

Keyboard shortcuts

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