test

package
v0.16.14 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 7 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

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

FakeCommand is a command wrapper for testing.

func (FakeCommand) ToCmd

func (c FakeCommand) ToCmd() testingexec.FakeCmd

ToCmd converts FakeCommand to FakeCmd.

type FixtureFileNotFoundError

type FixtureFileNotFoundError struct {
	Path string
	Name string
}

FixtureFileNotFoundError occurs when the requested fixture file does not exist.

func (FixtureFileNotFoundError) Error

func (e FixtureFileNotFoundError) Error() string

Jump to

Keyboard shortcuts

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