test

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFixture

func LoadFixture(name string) ([]byte, error)

LoadFixture loads the content of a fixture file.

func Must

func Must(content []byte, err error) []byte

Must be content. Basically go and panic if error happened.

func NewExecutor

func NewExecutor(commands []FakeCommand) *testingexec.FakeExec

NewExecutor is a factory for Commander testing.

Types

type FakeCommand added in v0.7.0

type FakeCommand struct {
	Command string
	StdOut  []byte
	StdErr  []byte
}

FakeCommand is a command wrapper for testing.

func (FakeCommand) ToCmd added in v0.7.0

func (c FakeCommand) ToCmd() testingexec.FakeCmd

ToCmd converts FakeCommand to FakeCmd.

type FixtureFileNotFoundError added in v0.9.0

type FixtureFileNotFoundError struct {
	Path string
	Name string
}

FixtureFileNotFoundError occurs when the requested fixture file does not exist.

func (FixtureFileNotFoundError) Error added in v0.9.0

func (e FixtureFileNotFoundError) Error() string

Jump to

Keyboard shortcuts

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