config

package
v0.0.0-...-f9409e5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PathToDefaultParamsFile path to config file with default parameters.
	PathToDefaultParamsFile = "./default.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralConfig

type GeneralConfig struct {
	ReportsDirAbsPath    string `yaml:"reports_dump_dir" envconfig:"REPORTS_DUMP_DIR"`
	VerboseLevel         string `yaml:"verbose_level" envconfig:"VERBOSE_LEVEL"`
	DumpFailedTests      bool   `yaml:"dump_failed_tests" envconfig:"DUMP_FAILED_TESTS"`
	DryRun               bool   `yaml:"dry_run" envconfig:"DRY_RUN"`
	KubernetesRolePrefix string `yaml:"kubernetes_role_prefix" envconfig:"KUBERNETES_ROLE_PREFIX"`
	WorkerLabelEnvVar    string `yaml:"worker_label" envconfig:"WORKER_LABEL"`
	WorkerLabel          string
	ControlPlaneLabel    string `yaml:"control_plane_label" envconfig:"CONTROL_PLANE_LABEL"`
	WorkerLabelMap       map[string]string
	ControlPlaneLabelMap map[string]string
}

GeneralConfig type keeps general configuration.

func NewConfig

func NewConfig() *GeneralConfig

NewConfig returns instance of GeneralConfig config type.

func (*GeneralConfig) GetDumpFailedTestReportLocation

func (cfg *GeneralConfig) GetDumpFailedTestReportLocation(file string) string

GetDumpFailedTestReportLocation returns destination file for failed tests logs.

func (*GeneralConfig) GetJunitReportPath

func (cfg *GeneralConfig) GetJunitReportPath(file string) string

GetJunitReportPath returns full path to the junit report file.

func (*GeneralConfig) GetReportPath

func (cfg *GeneralConfig) GetReportPath(file string) string

GetArtifactPath return full path to a file in the report directory.

func (*GeneralConfig) WriteReport

func (cfg *GeneralConfig) WriteReport(fileName string, content []byte) error

WriteReport writes contents into a file in the report directory.

Jump to

Keyboard shortcuts

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