testutils

package
v0.0.0-...-2e11bb7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCommandsMatch

func AssertCommandsMatch(t require.TestingT, expectedCommands [][]string, actualCommands []*exec.Command)

AssertCommandsMatch does a quick comparison of the commands returned by exec.CommandCollector with the name and arguments listed as a space seperated list. Other details of a command (e.g. if they had standard out or set environment variables) should be handled in follow on, specific assertions. If the size of the command lists does not match, as many as possible will be compared before ending in a fatal manner.

func Run

func Run(t require.TestingT, ctx context.Context, dir string, cmd ...string) string

Run runs the given command in the given dir and asserts that it succeeds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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