env

package
v0.0.0-...-0e24cfb Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const SHA = "359dcd3a19f109c50e97517fe6b1e2676e870c4d"

Date: 2/22/2023

Variables

View Source
var Modules = []string{
	"attributegen",
}

Functions

func EnsureWasmFiles

func EnsureWasmFiles(t *testing.T)

EnsureWasmFiles downloads wasm files for testing.

func GetBazelBin

func GetBazelBin() (string, error)

func GetBazelBinOrDie

func GetBazelBinOrDie() string

func GetBazelWorkspace

func GetBazelWorkspace() (string, error)

func GetBazelWorkspaceOrDie

func GetBazelWorkspaceOrDie() string

func GetDefaultEnvoyBin

func GetDefaultEnvoyBin() (string, error)

func GetDefaultEnvoyBinOrDie

func GetDefaultEnvoyBinOrDie() string

func HTTPGet

func HTTPGet(url string) (code int, respBody string, err error)

HTTPGet send GET

func HTTPGetWithHeaders

func HTTPGetWithHeaders(l string, headers map[string]string) (code int, respBody string, err error)

HTTPGetWithHeaders send HTTP with headers

func HTTPPost

func HTTPPost(url string, contentType string, reqBody string) (code int, respBody string, err error)

HTTPPost sends POST

func HTTPTlsGet

func HTTPTlsGet(url, rootdir string, port uint16) (code int, respBody string, err error)

HTTPGet send GET

func IsPortUsed

func IsPortUsed(port uint16) bool

IsPortUsed checks if a port is used

func IsTSanASan

func IsTSanASan() bool

func ShortLiveHTTPPost

func ShortLiveHTTPPost(url string, contentType string, reqBody string) (code int, respBody string, err error)

ShortLiveHTTPPost send HTTP without keepalive

func SkipTSan

func SkipTSan(t *testing.T)

func SkipTSanASan

func SkipTSanASan(t *testing.T)

func WaitForHTTPServer

func WaitForHTTPServer(url string) error

WaitForHTTPServer waits for a HTTP server

func WaitForHTTPServerWithTLS

func WaitForHTTPServerWithTLS(url, rootDir string, enableTLS bool, port uint16) error

WaitForHTTPServer waits for a HTTP server

func WaitForPort

func WaitForPort(port uint16)

WaitForPort waits for a TCP port

Types

type GRPCServer

type GRPCServer struct {
	grpc_echo.UnimplementedEchoServer
	// contains filtered or unexported fields
}

GRPCServer provides a simple grpc echo service for testing.

func NewGRPCServer

func NewGRPCServer(port uint16) *GRPCServer

NewGRPCServer configures a new GRPCServer. It does not attempt to start listening or anything else, however.

func (*GRPCServer) Echo

Echo implements the grpc_echo service.

func (*GRPCServer) EchoStream

func (g *GRPCServer) EchoStream(stream grpc_echo.Echo_EchoStreamServer) error

func (*GRPCServer) Start

func (g *GRPCServer) Start() <-chan error

Start causes the GRPCServer to start a listener and begin serving.

func (*GRPCServer) Stop

func (g *GRPCServer) Stop()

Stop closes the listener of the GRPCServer

type Ports

type Ports struct {
	BackendPort      uint16
	ClientAdmin      uint16
	ClientPort       uint16
	ServerPort       uint16
	ServerAdmin      uint16
	XDSPort          uint16
	ServerTunnelPort uint16
	Max              uint16
}

Ports stores all used ports

func NewPorts

func NewPorts(name uint16) *Ports

NewPorts allocate all ports based on test id.

type TestInventory

type TestInventory struct {
	Tests []string
}

func (*TestInventory) GetTestIndex

func (p *TestInventory) GetTestIndex(t *testing.T) uint16

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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