docker

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-2.0, GPL-2.0-or-later Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(t *testing.T) error

func Comment

func Comment(t *testing.T, args ...interface{})

Log args if -test.vv

func Commentf

func Commentf(t *testing.T, format string, args ...interface{})

Format args if -test.vv

func ExecCmd

func ExecCmd(t *testing.T, ID string, config *Config,
	cmd []string) (out string, err error)

func IntfVlanName added in v1.8.7

func IntfVlanName(name string, vlan int) (intf string)

func PingCmd

func PingCmd(t *testing.T, ID string, config *Config, target string) error

func TearDownContainers

func TearDownContainers(t *testing.T, config *Config)

Types

type Config

type Config struct {
	Volume  string
	Mapping string
	Routers []Router
	// contains filtered or unexported fields
}

func LaunchContainers

func LaunchContainers(t *testing.T, source []byte) (config *Config, err error)

type Docket

type Docket struct {
	Tmpl string
	*Config
}

func (*Docket) ExecCmd

func (d *Docket) ExecCmd(t *testing.T, ID string,
	cmd ...string) (string, error)

func (*Docket) PingCmd

func (d *Docket) PingCmd(t *testing.T, ID string, target string) error

func (*Docket) Test

func (d *Docket) Test(t *testing.T, tests ...test.Tester)

Docket.Test, unlike netport.NetDevs.Test, doesn't descend given tests during dryruns.

type Router

type Router struct {
	Image    string
	Hostname string // netns
	Cmd      string
	Intfs    []struct {
		Kind    string
		Name    string
		Vlan    int
		Address []string
	}
	Lowers map[string][]struct {
		Name string
		Vlan int
	}
	// contains filtered or unexported fields
}

initial values filled from yaml

func FindHost

func FindHost(config *Config, host string) (router Router, err error)

Jump to

Keyboard shortcuts

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