testing

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestJob

type TestJob struct {
	Image    string    `json:"image"`
	Commands []string  `json:"commands"`
	State    TestState `json:"state"`

	*symcommand.CommandOpts
	context.Context
	// contains filtered or unexported fields
}

func NewTestJob

func NewTestJob(image string, commands []string) *TestJob

func (*TestJob) Run

func (j *TestJob) Run(
	podName string,
	quit chan bool,
	errchan chan error)

type TestResult

type TestResult struct {
	Name     string        `json:"name"`
	Index    int           `json:"index"`
	Image    string        `json:"image"`
	Commands []string      `json:"commands"`
	State    TestState     `json:"state"`
	ExitCode int32         `json:"exitCode"`
	Logs     string        `json:"logs"`
	Duration time.Duration `json:"duration_s"`
	// contains filtered or unexported fields
}

func (*TestResult) MarshalJSON

func (t *TestResult) MarshalJSON() (b []byte, err error)

make sure we format duration as float of seconds

func (*TestResult) Write

func (t *TestResult) Write() error

type TestRunner

type TestRunner struct {
	CommandOpts *symcommand.CommandOpts
	// contains filtered or unexported fields
}

func NewTestRunner

func NewTestRunner(jobs []*TestJob, clientSet *kubernetes.Clientset, opts *symcommand.CommandOpts) (*TestRunner, error)

func (*TestRunner) Run

func (t *TestRunner) Run(testOutputDir string) error

type TestState

type TestState string
const (
	TEST_STATE_FAILED  TestState = "FAILED"
	TEST_STATE_SUCCESS TestState = "SUCCESS"
	TEST_STATE_PENDING TestState = "PENDING"
)

Jump to

Keyboard shortcuts

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