test_utils

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 16 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropTableFromSharedTestDB

func DropTableFromSharedTestDB(t *testing.T, table string)

DropTableFromSharedTestDB drops the table from the singleton in-memory database.

func GetConnectionWithAuthority

func GetConnectionWithAuthority(service string) (*grpc.ClientConn, error)

GetConnectionWithAuthority provides a gRPC connection to a service in the registry with Authority header.

func GetSharedMemoryDB

func GetSharedMemoryDB(t *testing.T) *sql.DB

GetSharedMemoryDB returns a singleton in-memory database connection.

func NewSQLBlobstore

func NewSQLBlobstore(t *testing.T, tableName string) blobstore.BlobStorageFactory

NewSQLBlobstore returns a new blobstore storage factory utilizing the singleton in-memory database.

func NewTestOrchestratorService

func NewTestOrchestratorService(
	t *testing.T,
	moduleName string,
	serviceType string,
	labels map[string]string,
	annotations map[string]string,
) (*cloud_service.OrchestratorService, net.Listener)

NewTestOrchestratorService creates and registers a test orchestrator service on a dynamically selected available local port for the gRPC server and HTTP echo server. Returns the newly created service and listener it was registered with.

func NewTestService

func NewTestService(t *testing.T, moduleName string, serviceType string) (*platform_service.Service, net.Listener)

NewTestService creates and registers a basic test Magma service on a dynamically selected available local port. Returns the newly created service and listener it was registered with.

Types

This section is empty.

Jump to

Keyboard shortcuts

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