config

package
v1.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Formatter is the format configuration to write logs into text
	Formatter = logrus.TextFormatter{
		DisableTimestamp: false,
	}

	// TestLogWriter is a buffer in which all logs generated by a test are
	// stored
	TestLogWriter bytes.Buffer
	// TestLogFileName is the file name to dump `TestLogWriter` content when
	// test finish
	TestLogFileName = "test-output.log"
)
View Source
var CiliumTestConfig = CiliumTestConfigType{}

CiliumTestConfig holds the global configuration of commandline flags in the ginkgo-based testing environment.

Functions

func TestLogWriterReset added in v1.5.0

func TestLogWriterReset()

TestLogWriterReset resets the current buffer

Types

type CiliumTestConfigType

type CiliumTestConfigType struct {
	Reprovision bool
	// HoldEnvironment leaves the test infrastructure in place on failure
	HoldEnvironment bool
	// PassCLIEnvironment passes through the environment invoking the gingko
	// tests. When false all subcommands are executed with an empty environment,
	// including PATH.
	PassCLIEnvironment  bool
	SSHConfig           string
	ShowCommands        bool
	TestScope           string
	SkipLogGathering    bool
	CiliumImage         string
	CiliumOperatorImage string
	ProvisionK8s        bool
	Timeout             time.Duration
	Kubeconfig          string
	Registry            string
	Benchmarks          bool
}

CiliumTestConfigType holds all of the configurable elements of the testsuite

func (*CiliumTestConfigType) ParseFlags

func (c *CiliumTestConfigType) ParseFlags()

ParseFlags parses commandline flags relevant to testing.

type LogHook added in v1.5.0

type LogHook struct{}

LogHook to send logs via `ginkgo.GinkgoWriter`.

func (*LogHook) Fire added in v1.5.0

func (h *LogHook) Fire(entry *logrus.Entry) (err error)

Fire is a callback function used by logrus to write logs that match in the given by `Levels` method

func (*LogHook) Levels added in v1.5.0

func (h *LogHook) Levels() []logrus.Level

Levels defined levels to send logs to FireAction

Jump to

Keyboard shortcuts

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