test

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireAPIToken

func RequireAPIToken(t *testing.T)

Types

type Command

type Command struct {
	T    *testing.T
	Args []string
	Out  *bytes.Buffer
}

func NewCommand

func NewCommand(t *testing.T, args ...string) *Command

Create an integration test command, which when Run() is very nearly the same as invoking a CLI command from a shell except that the command runs w/o forking and we capture the output in a buffer. The output can be parsed as JSON or YAML using the corresponding functions.

func (*Command) JSON

func (c *Command) JSON() *jnode.Node

func (*Command) Must

func (c *Command) Must(err error)

func (*Command) Run

func (c *Command) Run() error

func (*Command) YAML added in v0.5.9

func (c *Command) YAML() map[string]interface{}

type Tool

type Tool struct {
	Command
	Fingerprints *jnode.Node
	ExtraArgs    []string
	// contains filtered or unexported fields
}

func NewTool

func NewTool(t *testing.T, args ...string) *Tool

Create a new integration test command for an assessment tool.

func (*Tool) Run

func (t *Tool) Run() error

func (*Tool) WithFingerprints

func (t *Tool) WithFingerprints() *Tool

func (*Tool) WithRepoRootDir

func (t *Tool) WithRepoRootDir() *Tool

func (*Tool) WithUpload

func (t *Tool) WithUpload(enable bool) *Tool

Jump to

Keyboard shortcuts

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