Documentation ¶
Overview ¶
Package allochelper is a package for helper function that is used by e2e tests
Index ¶
- func CleanupNamespaces(ctx context.Context, framework *e2e.Framework) error
- func CopyDefaultAllocatorClientSecret(ctx context.Context, t *testing.T, toNamespace string, ...)
- func CreateAllocationPolicy(ctx context.Context, t *testing.T, framework *e2e.Framework, ...)
- func CreateFleet(ctx context.Context, namespace string, framework *e2e.Framework) (*agonesv1.Fleet, error)
- func CreateFleetWithOpts(ctx context.Context, namespace string, framework *e2e.Framework, ...) (*agonesv1.Fleet, error)
- func CreateRemoteClusterDialOptions(ctx context.Context, namespace, clientSecretName string, tlsCA []byte, ...) ([]grpc.DialOption, error)
- func DeleteAgonesPod(ctx context.Context, podName string, namespace string, ...) error
- func GetAllocatorClient(ctx context.Context, t *testing.T, framework *e2e.Framework) (pb.AllocationServiceClient, error)
- func GetAllocatorEndpoint(ctx context.Context, t *testing.T, framework *e2e.Framework) (string, int32)
- func GetTLSConfig(ctx context.Context, namespace, clientSecretName string, tlsCA []byte, ...) (*tls.Config, error)
- func RefreshAllocatorTLSCerts(ctx context.Context, t *testing.T, host string, framework *e2e.Framework) []byte
- func ValidateAllocatorResponse(t *testing.T, resp *pb.AllocationResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupNamespaces ¶
CleanupNamespaces cleans up the framework namespace
func CopyDefaultAllocatorClientSecret ¶
func CopyDefaultAllocatorClientSecret(ctx context.Context, t *testing.T, toNamespace string, framework *e2e.Framework)
CopyDefaultAllocatorClientSecret copys the allocator client secret
func CreateAllocationPolicy ¶
func CreateAllocationPolicy(ctx context.Context, t *testing.T, framework *e2e.Framework, p *multiclusterv1.GameServerAllocationPolicy)
CreateAllocationPolicy create a allocation policy
func CreateFleet ¶
func CreateFleet(ctx context.Context, namespace string, framework *e2e.Framework) (*agonesv1.Fleet, error)
CreateFleet creates a game server fleet
func CreateFleetWithOpts ¶
func CreateFleetWithOpts(ctx context.Context, namespace string, framework *e2e.Framework, opts func(fleet *agonesv1.Fleet)) (*agonesv1.Fleet, error)
CreateFleetWithOpts creates a game server fleet with the designated options
func CreateRemoteClusterDialOptions ¶ added in v1.42.0
func CreateRemoteClusterDialOptions(ctx context.Context, namespace, clientSecretName string, tlsCA []byte, framework *e2e.Framework) ([]grpc.DialOption, error)
CreateRemoteClusterDialOptions creates a grpc client dial option with proper certs to make a remote call.
func DeleteAgonesPod ¶
func DeleteAgonesPod(ctx context.Context, podName string, namespace string, framework *e2e.Framework) error
DeleteAgonesPod deletes an Agones pod with the specified namespace and podname
func GetAllocatorClient ¶
func GetAllocatorClient(ctx context.Context, t *testing.T, framework *e2e.Framework) (pb.AllocationServiceClient, error)
GetAllocatorClient creates an allocator client and ensures that it can be connected to. Returns a client that has at least once successfully allocated from a fleet. The fleet used to test the client is leaked.
func GetAllocatorEndpoint ¶
func GetAllocatorEndpoint(ctx context.Context, t *testing.T, framework *e2e.Framework) (string, int32)
GetAllocatorEndpoint gets the allocator LB endpoint
func GetTLSConfig ¶
func GetTLSConfig(ctx context.Context, namespace, clientSecretName string, tlsCA []byte, framework *e2e.Framework) (*tls.Config, error)
GetTLSConfig gets the namesapce client secret
func RefreshAllocatorTLSCerts ¶
func RefreshAllocatorTLSCerts(ctx context.Context, t *testing.T, host string, framework *e2e.Framework) []byte
RefreshAllocatorTLSCerts refreshes the allocator TLS cert with a newly generated cert
func ValidateAllocatorResponse ¶
func ValidateAllocatorResponse(t *testing.T, resp *pb.AllocationResponse)
ValidateAllocatorResponse validates the response returned by the allcoator
Types ¶
This section is empty.