testing

package
v0.9.4-test1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2018 License: Apache-2.0 Imports: 15 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirToMap

func DirToMap(dir string) (map[string]interface{}, error)

DirToMap converts directory to a map where keys are filenames without full path and values are the contents of the files. Files with '.iso' extensions are unpacked using 7z and then converted to a map using DirToMap. Directories are handled recursively. If the directory doesn't exist, dirToMap returns nil

func EncodePEMCert added in v0.9.4

func EncodePEMCert(cert *x509.Certificate) string

func EncodePEMKey added in v0.9.4

func EncodePEMKey(key *rsa.PrivateKey) string

func GenerateCert added in v0.9.4

func GenerateCert(t *testing.T, isCA bool, host string, signer *x509.Certificate, key *rsa.PrivateKey) (*x509.Certificate, *rsa.PrivateKey)

func IsoToMap

func IsoToMap(isoPath string) (map[string]interface{}, error)

IsoToMap converts an iso image to a map where keys are filenames without full path and values are the contents of the files. It does so by unpacking the image into a temporary directory and processing it with DirToMap.

Types

type TestCommand added in v0.9.4

type TestCommand struct {
	Command *exec.Cmd
	// contains filtered or unexported fields
}

func RunProcess added in v0.9.4

func RunProcess(t *testing.T, command string, args []string, env []string) *TestCommand

RunProcess runs a background process with specified args and appending env to the current environment.

func (*TestCommand) Pid added in v0.9.4

func (tc *TestCommand) Pid() int

func (*TestCommand) Stop added in v0.9.4

func (tc *TestCommand) Stop()

Jump to

Keyboard shortcuts

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