testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CharmServerHost = "127.0.0.1"

Charm server for testing (docker)

View Source
const TestHost = "127.0.0.1"

Tavern testing server

View Source
const TestServerAddr = TestHost + ":8000"
View Source
const TestServerURL = "http://" + TestHost + ":8000"
View Source
const UploadsPath = "/uploads"

Variables

This section is empty.

Functions

func CharmClient

func CharmClient() (*client.Client, error)

func TavernServer

func TavernServer(ctx context.Context, dataDir string) (*ts.Server, error)

func TavernServerA

func TavernServerA(ctx context.Context, dataDir string, allowList ...string) (*ts.Server, error)

Start a Tavern server with an allowed list of Charm servers

func WaitForServer

func WaitForServer(addr string) bool

func WaitForServerShutdown

func WaitForServerShutdown(addr string) bool

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

Thread safe buffer to avoid data races when setting a custom writer for the log

func (*Buffer) Read

func (b *Buffer) Read(p []byte) (n int, err error)

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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