goldentest

package
v0.8.2 Latest Latest
Warning

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

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

Documentation

Overview

Package goldentest implements golden test related subcommands.

Package goldentest implements golden test related subcommands.

Package goldentest implements golden test related subcommands.

Package goldentest implements golden test related subcommands.

Package goldentest implements golden test related subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {

	// Location is the file system location of the templates to be tested.
	//
	// Example: t/rest_server.
	Location string

	// Testnames are the name of the test cases to record or verify. If no
	// test name is specified, all gold tests will be run against.
	//
	// Optional.
	TestNames []string
}

Flags describes the template location and the test case.

func (*Flags) Register

func (r *Flags) Register(set *cli.FlagSet)

type NewTestCommand added in v0.6.0

type NewTestCommand struct {
	cli.BaseCommand
	// contains filtered or unexported fields
}

func (*NewTestCommand) Desc added in v0.6.0

func (c *NewTestCommand) Desc() string

func (*NewTestCommand) Flags added in v0.6.0

func (c *NewTestCommand) Flags() *cli.FlagSet

func (*NewTestCommand) Help added in v0.6.0

func (c *NewTestCommand) Help() string

func (*NewTestCommand) Run added in v0.6.0

func (c *NewTestCommand) Run(ctx context.Context, args []string) (rErr error)

type NewTestFlags added in v0.6.0

type NewTestFlags struct {

	// Location is the file system location of the template to be tested.
	//
	// Example: t/rest_server.
	Location string

	// NewTestName are the name of the test case to create.
	NewTestName string

	// Flag arguments (--foo):
	// See common/flags.Inputs().
	Inputs map[string]string

	// Whether to prompt the user for new-test inputs.
	Prompt bool

	// Fake builtin_vars used in goldentest.
	BuiltinVars map[string]string

	// ForceOverwrite lets existing test config file be overwritten.
	ForceOverwrite bool
}

NewTestFlags describes what new golden test to render and how.

func (*NewTestFlags) Register added in v0.6.0

func (r *NewTestFlags) Register(set *cli.FlagSet)

type RecordCommand

type RecordCommand struct {
	cli.BaseCommand
	// contains filtered or unexported fields
}

func (*RecordCommand) Desc

func (c *RecordCommand) Desc() string

func (*RecordCommand) Flags

func (c *RecordCommand) Flags() *cli.FlagSet

func (*RecordCommand) Help

func (c *RecordCommand) Help() string

func (*RecordCommand) Run

func (c *RecordCommand) Run(ctx context.Context, args []string) error

type TestCase

type TestCase struct {
	// Name of the test case.
	// Example: nextjs_with_auth0_idp.
	TestName string

	// Config of the test case.
	TestConfig *goldentest.Test
}

TestCase describes a template golden test case.

type VerifyCommand

type VerifyCommand struct {
	cli.BaseCommand
	// contains filtered or unexported fields
}

func (*VerifyCommand) Desc

func (c *VerifyCommand) Desc() string

func (*VerifyCommand) Flags

func (c *VerifyCommand) Flags() *cli.FlagSet

func (*VerifyCommand) Help

func (c *VerifyCommand) Help() string

func (*VerifyCommand) Run

func (c *VerifyCommand) Run(ctx context.Context, args []string) (rErr error)

Jump to

Keyboard shortcuts

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