e2e

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KnDefaultTestImage string        = "gcr.io/knative-samples/helloworld-go"
	MaxRetries         int           = 10
	RetrySleepDuration time.Duration = 5 * time.Second
)

Variables

View Source
var Flags = initializeFlags()

Flags holds the command line flags or defaults for settings in the user's environment. See ClientFlags for the list of supported fields.

Functions

func NewE2eTest

func NewE2eTest() (*e2eTest, error)

func RunKubectl added in v0.13.0

func RunKubectl(namespace string, args ...string) (string, error)

RunKubectl runs "kubectl" in a given namespace

Types

type ClientFlags added in v0.11.0

type ClientFlags struct {
	DockerConfigJSON string
}

ClientFlags define the flags that are needed to run the e2e tests.

type KnRunResult added in v0.13.0

type KnRunResult struct {
	// Command line called
	CmdLine string
	// Standard output of command
	Stdout string
	// Standard error of command
	Stderr string
	// And extra dump informations in case of an unexpected error
	DumpInfo string
	// Error occurred during execution
	Error error
	// Was an error expected ?
	ErrorExpected bool
}

Result of a "kn" call

func RunKn added in v0.13.0

func RunKn(namespace string, args []string) KnRunResult

RunKn runs "kn" in a given namespace

type KnRunResultCollector added in v0.13.0

type KnRunResultCollector struct {
	// contains filtered or unexported fields
}

Collector for results

func NewKnRunResultCollector added in v0.13.0

func NewKnRunResultCollector(t *testing.T) *KnRunResultCollector

func (*KnRunResultCollector) AddDump added in v0.13.0

func (c *KnRunResultCollector) AddDump(kind string, name string, namespace string)

AddDump adds extra dump information to the collector which is printed out if an error occurs

func (*KnRunResultCollector) AssertError added in v0.13.0

func (c *KnRunResultCollector) AssertError(result KnRunResult)

func (*KnRunResultCollector) AssertNoError added in v0.13.0

func (c *KnRunResultCollector) AssertNoError(result KnRunResult)

func (*KnRunResultCollector) DumpIfFailed added in v0.13.0

func (c *KnRunResultCollector) DumpIfFailed()

Jump to

Keyboard shortcuts

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