test

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package test provides test utilities for command types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandSuite

type CommandSuite[T command.Command] struct {
	suite.Suite
	Cmd T
	// contains filtered or unexported fields
}

CommandSuite is a testify test suite for commands.

func NewCommandSuite

func NewCommandSuite[T command.Command](cmd T) CommandSuite[T]

Create a new NewCommandSuite for the given command interface.

func (*CommandSuite[T]) RequireResultFail

func (s *CommandSuite[T]) RequireResultFail(msg string)

Assert the command returned an error that contains the provided message.

func (*CommandSuite[T]) RequireResultPass

func (s *CommandSuite[T]) RequireResultPass()

Assert that the command returned no error.

func (*CommandSuite[T]) RunCommand

func (s *CommandSuite[T]) RunCommand(args ...string)

Run the command with the provided arguments and cache the result.

Jump to

Keyboard shortcuts

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