config

package
v0.0.0-...-6776c55 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileConfigPath path to config file.
	FileConfigPath = "config/config.yaml"
)

Variables

This section is empty.

Functions

func DefineClients

func DefineClients() (*testclient.ClientSet, error)

DefineClients sets client and return it's instance.

Types

type Config

type Config struct {
	General struct {
		ReportDirAbsPath      string `yaml:"report" envconfig:"REPORT_DIR_NAME"`
		CnfNodeLabel          string `yaml:"cnf_worker_label" envconfig:"ROLE_WORKER_CNF"`
		WorkerNodeLabel       string `yaml:"worker_label" envconfig:"ROLE_WORKER"`
		TestImage             string `yaml:"test_image" envconfig:"TEST_IMAGE"`
		VerificationLogLevel  string `yaml:"verification_log_level" envconfig:"VERIFICATION_LOG_LEVEL"`
		DebugTnf              string `envconfig:"DEBUG_TNF"`
		TnfConfigDir          string `yaml:"tnf_config_dir" envconfig:"TNF_CONFIG_DIR"`
		TnfRepoPath           string `envconfig:"TNF_REPO_PATH"`
		TnfEntryPointScript   string `yaml:"tnf_entry_point_script" envconfig:"TNF_ENTRY_POINT_SCRIPT"`
		TnfReportDir          string `yaml:"tnf_report_dir" envconfig:"TNF_REPORT_DIR"`
		DockerConfigDir       string `yaml:"docker_config_dir" envconfig:"DOCKER_CONFIG_DIR"`
		TnfImage              string `yaml:"tnf_image" envconfig:"TNF_IMAGE"`
		TnfImageTag           string `yaml:"tnf_image_tag" envconfig:"TNF_IMAGE_TAG"`
		DisableIntrusiveTests string `yaml:"disable_intrusive_tests" envconfig:"DISABLE_INTRUSIVE_TESTS"`
		ContainerEngine       string `default:"docker" yaml:"container_engine" envconfig:"CONTAINER_ENGINE"`
	} `yaml:"general"`
}

Config type keeps general GetConfiguration().

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns instance Config type.

func (*Config) CreateLogFile

func (c *Config) CreateLogFile(testSuite string, tcName string) *os.File

CreateLogFile creates log file for testSuite.

func (*Config) DebugTnf

func (c *Config) DebugTnf() (bool, error)

DebugTnf activates debug mode.

func (*Config) GetReportPath

func (c *Config) GetReportPath(file string) string

GetReportPath returns full path to the report file.

Jump to

Keyboard shortcuts

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