e2e

package module
v0.0.0-...-2f2b7fa Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context() context.Context

Context returns a Context registered to close on SIGTERM and SIGINT. If a second signal is caught, the program is terminated with exit code 1.

func File

func File(ctx context.Context, name string) (*os.File, error)

File returns a writer to a new file that will be closed when the context is cancelled.

func GoRun

func GoRun(ctx context.Context, out, errOut io.Writer, args ...string) (int, error)

GoRun runs the command in the background and returns a process group id

func MustFile

func MustFile(ctx context.Context, t *testing.T, name string) *os.File

MustFile fails the test if it can't create a file called name.

func NewTLog

func NewTLog(t testing.TB) io.Writer

NewTLog returns a TLogger

func Run

func Run(ctx context.Context, out, errOut io.Writer, args ...string) error

Run runs the command and blocks until it is finished

func WaitForServerReady

func WaitForServerReady(address string, out io.Writer)

WaitForServerReady polls the address every second until it responds

Types

type Client

type Client interface {
	V1() v1Client
}

Client holds versioned clients to spicedb that all share the same connection

func NewClient

func NewClient(conn *grpc.ClientConn) Client

NewClient returns a spicedb Client for the given grpc connection

type TLogger

type TLogger struct {
	testing.TB
}

TLogger wraps a testing.TB and makes it conform to io.Writer

func (*TLogger) Write

func (t *TLogger) Write(p []byte) (int, error)

Write satisfied io.Writer

Directories

Path Synopsis
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.

Jump to

Keyboard shortcuts

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