test

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaybeSkip

func MaybeSkip(t TestingT)

MaybeSkip should be called for integration tests. It will skip test if testing's short flag is being set.

Types

type Command

type Command struct {
	Executable string
	Args       []string
}

Command represents a binary command to be executed.

func ResolveKnEventCommand

func ResolveKnEventCommand(t TestingT) Command

ResolveKnEventCommand will look for the kn event executable. Executable can be overridden by setting the environment variable: KN_PLUGIN_EVENT_EXECUTABLE Base args can be overridden by setting the environment variable: KN_PLUGIN_EVENT_EXECUTABLE_ARGS.

Set: ``` KN_PLUGIN_EVENT_EXECUTABLE=/path/to/kn KN_PLUGIN_EVENT_EXECUTABLE_ARGS=event ``` to test kn-plugin-event as embedded in kn CLI.

func (Command) ToIcmd

func (c Command) ToIcmd(args ...string) icmd.Cmd

ToIcmd converts to icmd.Cmd.

type TestingT

type TestingT interface {
	Name() string
	Skipf(format string, args ...interface{})
}

TestingT a subset of testing.T.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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