config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 9 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 KindExposePort added in v1.1.0

type KindExposePort struct {
	Namespace string `yaml:"namespace"`
	Resource  string `yaml:"resource"`
	Port      string `yaml:"port"`
}

type KindSetup added in v1.1.0

type KindSetup struct {
	ImportImages []string         `yaml:"import-images"`
	ExposePorts  []KindExposePort `yaml:"expose-ports"`
}

type Manifest

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

type ReusingCases added in v1.1.0

type ReusingCases struct {
	Cases []VerifyCase `yaml:"cases"`
}

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"`
	Kubeconfig            string    `yaml:"kubeconfig"`
	Steps                 []Step    `yaml:"steps"`
	Timeout               any       `yaml:"timeout"`
	InitSystemEnvironment string    `yaml:"init-system-environment"`
	Kind                  KindSetup `yaml:"kind"`
	// contains filtered or unexported fields
}

func (*Setup) Finalize added in v1.1.0

func (s *Setup) Finalize() error

func (*Setup) GetFile

func (s *Setup) GetFile() string

func (*Setup) GetKubeconfig added in v1.3.0

func (s *Setup) GetKubeconfig() string

func (*Setup) GetTimeout added in v1.1.0

func (s *Setup) GetTimeout() time.Duration

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"`
	Body     string            `yaml:"body"`
	Headers  map[string]string `yaml:"headers"`
}

type Verify

type Verify struct {
	RetryStrategy VerifyRetryStrategy `yaml:"retry"`
	Cases         []VerifyCase        `yaml:"cases"`
	FailFast      bool                `yaml:"fail-fast"`
	Concurrency   bool                `yaml:"concurrency"`
}

type VerifyCase

type VerifyCase struct {
	Name     string   `yaml:"name"`
	Query    string   `yaml:"query"`
	Actual   string   `yaml:"actual"`
	Expected string   `yaml:"expected"`
	Includes []string `yaml:"includes"`
}

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 any `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