utils

package
v0.0.0-...-e0271d0 Latest Latest
Warning

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

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

Documentation

Overview

Package utils contains end-to-end utils.

Index

Constants

View Source
const (

	// DefaultUser is the email contained in the test JWT.
	DefaultUser = "roxbot+release-registry-e2e@redhat.com"
)

Variables

View Source
var RemotePort int

RemotePort is the port of the mock server for e2e tests.

Functions

func DefaultUserJwt

func DefaultUserJwt() string

DefaultUserJwt returns the default user's JWT used in tests.

func GetFixturesPath

func GetFixturesPath() (string, error)

GetFixturesPath constructs the absolute path to the fixtures directory.

func GetGRPCConnection

func GetGRPCConnection(ctx context.Context, remotePort int, token string) (*grpc.ClientConn, error)

GetGRPCConnection creates an authenticated GRPC client connection to a remote.

func SetupE2ETest

func SetupE2ETest(t *testing.T, databasePath string)

SetupE2ETest creates a buffered listener, initializes the database and starts the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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