config

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

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

func TestLogWriterReset()

TestLogWriterReset resets the current buffer

Types

type CiliumTestConfigType

type CiliumTestConfigType struct {
	Reprovision      bool
	HoldEnvironment  bool
	SSHConfig        string
	ShowCommands     bool
	TestScope        string
	SkipLogGathering 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

type LogHook struct{}

LogHook to send logs via `ginkgo.GinkgoWriter`.

func (*LogHook) Fire

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

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