package testutils
import "github.com/coreos/rkt/tests/testutils"
Index ¶
- func CheckTcp4Port(port int) (bool, error)
- func GetDefaultGWv4() (string, error)
- func GetDefaultGWv6() (string, error)
- func GetGW(iface string, family int) (string, error)
- func GetGWv4(iface string) (string, error)
- func GetGWv6(iface string) (string, error)
- func GetIPs(ifaceWanted string, familyWanted int) ([]string, error)
- func GetIPsv4(iface string) ([]string, error)
- func GetIPsv6(iface string) ([]string, error)
- func GetIfaceCount() (int, error)
- func GetNextFreePort4() (int, error)
- func GetNextFreePort4Banned(bannedPorts map[int]struct{}) (int, error)
- func GetNonLoIfaceIPv4() (string, error)
- func GetNonLoIfaceWithAddrs(ipFamily int) (iface net.Interface, addrs []string, err error)
- func GetUnprivilegedUidGid() (int, int)
- func GetValueFromEnvOrPanic(envVar string) string
- func HTTPGet(addr string) (string, error)
- func HTTPServe(addr string, timeout int) error
- func WaitOrTimeout(t *testing.T, timeout time.Duration, notify chan struct{})
- type GoroutineAssistant
- func NewGoroutineAssistant(t *testing.T) *GoroutineAssistant
- func (a *GoroutineAssistant) Add(n int)
- func (a *GoroutineAssistant) Done()
- func (a *GoroutineAssistant) Fatalf(s string, args ...interface{})
- func (a *GoroutineAssistant) SpawnOrFail(cmd string) *gexpect.ExpectSubprocess
- func (a *GoroutineAssistant) Wait()
- func (a *GoroutineAssistant) WaitOrFail(child *gexpect.ExpectSubprocess)
- type RktRunCtx
- func NewRktRunCtx() *RktRunCtx
- func (ctx *RktRunCtx) Cleanup()
- func (ctx *RktRunCtx) Cmd() string
- func (ctx *RktRunCtx) CmdNoConfig() string
- func (ctx *RktRunCtx) DataDir() string
- func (ctx *RktRunCtx) ExecCmd(arg ...string) *exec.Cmd
- func (ctx *RktRunCtx) GetUidGidRktBinOwnerNotRoot() (int, int)
- func (ctx *RktRunCtx) LaunchMDS() error
- func (ctx *RktRunCtx) LocalDir() string
- func (ctx *RktRunCtx) RegisterChild(child *gexpect.ExpectSubprocess)
- func (ctx *RktRunCtx) Reset()
- func (ctx *RktRunCtx) RunGC()
- func (ctx *RktRunCtx) SetupDataDir() error
- func (ctx *RktRunCtx) SystemDir() string
- func (ctx *RktRunCtx) UserDir() string
- type Test
- type TestFunc
Functions ¶
func CheckTcp4Port ¶
func GetDefaultGWv4 ¶
func GetDefaultGWv6 ¶
func GetGW ¶
func GetGWv4 ¶
func GetGWv6 ¶
func GetIPs ¶
func GetIPsv4 ¶
func GetIPsv6 ¶
func GetIfaceCount ¶
func GetNextFreePort4 ¶
func GetNextFreePort4Banned ¶
func GetNonLoIfaceIPv4 ¶
func GetNonLoIfaceWithAddrs ¶
func GetUnprivilegedUidGid ¶
func GetValueFromEnvOrPanic ¶
func HTTPGet ¶
func HTTPServe ¶
func WaitOrTimeout ¶
Types ¶
type GoroutineAssistant ¶
type GoroutineAssistant struct {
// contains filtered or unexported fields
}
func NewGoroutineAssistant ¶
func NewGoroutineAssistant(t *testing.T) *GoroutineAssistant
func (*GoroutineAssistant) Add ¶
func (a *GoroutineAssistant) Add(n int)
func (*GoroutineAssistant) Done ¶
func (a *GoroutineAssistant) Done()
func (*GoroutineAssistant) Fatalf ¶
func (a *GoroutineAssistant) Fatalf(s string, args ...interface{})
func (*GoroutineAssistant) SpawnOrFail ¶
func (a *GoroutineAssistant) SpawnOrFail(cmd string) *gexpect.ExpectSubprocess
func (*GoroutineAssistant) Wait ¶
func (a *GoroutineAssistant) Wait()
func (*GoroutineAssistant) WaitOrFail ¶
func (a *GoroutineAssistant) WaitOrFail(child *gexpect.ExpectSubprocess)
type RktRunCtx ¶
type RktRunCtx struct {
// contains filtered or unexported fields
}
func NewRktRunCtx ¶
func NewRktRunCtx() *RktRunCtx
func (*RktRunCtx) Cleanup ¶
func (ctx *RktRunCtx) Cleanup()
func (*RktRunCtx) Cmd ¶
func (*RktRunCtx) CmdNoConfig ¶
TODO(jonboulle): clean this up
func (*RktRunCtx) DataDir ¶
func (*RktRunCtx) ExecCmd ¶
func (*RktRunCtx) GetUidGidRktBinOwnerNotRoot ¶
func (*RktRunCtx) LaunchMDS ¶
func (*RktRunCtx) LocalDir ¶
func (*RktRunCtx) RegisterChild ¶
func (ctx *RktRunCtx) RegisterChild(child *gexpect.ExpectSubprocess)
func (*RktRunCtx) Reset ¶
func (ctx *RktRunCtx) Reset()
func (*RktRunCtx) RunGC ¶
func (ctx *RktRunCtx) RunGC()
func (*RktRunCtx) SetupDataDir ¶
func (*RktRunCtx) SystemDir ¶
func (*RktRunCtx) UserDir ¶
type Test ¶
Test is the interface that wraps a test. It is meant to be used for parametrized test fixtures.
Execute executes the test.
type TestFunc ¶
TestFunc is a functional adapter to allow ordinary functions as test wrappers.
func (TestFunc) Execute ¶
Source Files ¶
ctx.go datadirsetup.go goroutineassistant.go httputils.go iputils.go test.go utils.go
Directories ¶
Path | Synopsis |
---|---|
tests/testutils/aci-server | |
tests/testutils/logger |
- Version
- v1.30.0 (latest)
- Published
- Apr 13, 2018
- Platform
- linux/amd64
- Imports
- 24 packages
- Last checked
- 3 days ago –
Tools for package owners.