config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadGlobalConfigFile

func ReadGlobalConfigFile()

Types

type Cleanup

type Cleanup struct {
	On string `yaml:"on"`
}

type E2EConfig

type E2EConfig struct {
	Setup   Setup   `yaml:"setup"`
	Cleanup Cleanup `yaml:"cleanup"`
	Trigger Trigger `yaml:"trigger"`
	Verify  Verify  `yaml:"verify"`
}

E2EConfig corresponds to configuration file e2e.yaml.

type GlobalE2EConfig

type GlobalE2EConfig struct {
	Error     error
	E2EConfig E2EConfig
}

GlobalE2EConfig stores E2EConfig which can be used globally.

var GlobalConfig GlobalE2EConfig

type Manifest

type Manifest struct {
	Path  string `yaml:"path"`
	Waits []Wait `yaml:"wait"`
}

type Run

type Run struct {
	Command string `yaml:"command"`
	Waits   []Wait `yaml:"wait"`
}

type Setup

type Setup struct {
	Env     string `yaml:"env"`
	File    string `yaml:"file"`
	Steps   []Step `yaml:"steps"`
	Timeout int    `yaml:"timeout"`
}

func (*Setup) GetFile

func (s *Setup) GetFile() string

type Step

type Step struct {
	Name    string `yaml:"name"`
	Path    string `yaml:"path"`
	Command string `yaml:"command"`
	Waits   []Wait `yaml:"wait"`
}

type Trigger

type Trigger struct {
	Action   string `yaml:"action"`
	Interval string `yaml:"interval"`
	Times    int    `yaml:"times"`
	URL      string `yaml:"url"`
	Method   string `yaml:"method"`
}

type Verify

type Verify struct {
	RetryStrategy VerifyRetryStrategy `yaml:"retry"`
	Cases         []VerifyCase        `yaml:"cases"`
}

type VerifyCase

type VerifyCase struct {
	Query    string `yaml:"query"`
	Actual   string `yaml:"actual"`
	Expected string `yaml:"expected"`
}

func (*VerifyCase) GetActual

func (v *VerifyCase) GetActual() string

GetActual resolves the absolute file path of the actual data file.

func (*VerifyCase) GetExpected

func (v *VerifyCase) GetExpected() string

GetExpected resolves the absolute file path of the expected data file.

type VerifyRetryStrategy

type VerifyRetryStrategy struct {
	Count    int `yaml:"count"`
	Interval int `yaml:"interval"`
}

type Wait

type Wait struct {
	Namespace     string `yaml:"namespace"`
	Resource      string `yaml:"resource"`
	LabelSelector string `yaml:"label-selector"`
	For           string `yaml:"for"`
}

Jump to

Keyboard shortcuts

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