clitest

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTemplateVersionSource added in v0.4.0

func CreateTemplateVersionSource(t *testing.T, responses *echo.Responses) string

CreateTemplateVersionSource writes the echo provisioner responses into a new temporary testing directory.

func New

func New(t *testing.T, args ...string) (*cobra.Command, config.Root)

New creates a CLI instance with a configuration pointed to a temporary testing directory.

func NewWithSubcommands added in v0.8.7

func NewWithSubcommands(
	t *testing.T, subcommands []*cobra.Command, args ...string,
) (*cobra.Command, config.Root)

func SetupConfig

func SetupConfig(t *testing.T, client *codersdk.Client, root config.Root)

SetupConfig applies the URL and SessionToken of the client to the config.

func Start added in v0.19.0

func Start(ctx context.Context, t *testing.T, cmd *cobra.Command)

Start runs the command in a goroutine and cleans it up when the test completed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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