fixtures

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootFixtures = []Fixture{
	{
		Name:      "base",
		Args:      []string{},
		ExitCode:  0,
		Timeout:   5 * time.Second,
		NeedsAuth: false,
		Assert: func(t *testing.T, stdout, stderr []byte) {
			assertGoldenFile(t, golden.RootStdout, stdout, 0)
		},
	},
}

Functions

func Fixtures

func Fixtures() map[string][]Fixture

Fixtures returns all the fixtures for the e2ev2 tests.

Types

type Fixture

type Fixture struct {
	// Name is the name of the fixture.
	Name string
	// Args is the command arguments.
	Args []string
	// ExitCode is the expected exit code of the command.
	ExitCode int
	// Timeout is the maximum time to wait for the command to complete.
	Timeout time.Duration
	// NeedsAuth is set to configure a PAT and org ID before running the fixture.
	NeedsAuth bool
	// AssertSchema is the function that asserts the expected output.
	Assert func(t *testing.T, stdout, stderr []byte)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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