testing

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnCI

func OnCI() bool

Return true if running on CI. Currently only detects Jenkins. For cleanup.

Types

type MockTB

type MockTB struct {
	LogCnt, ErrCnt, FatalCnt int
	Skp                      bool
	// contains filtered or unexported fields
}

MockTB mocks testing.TB for test of CheckFormattingErrs. Not perfect - not sure how to replicate Fail*/Fatal*/Skip* behavior short of a dynamic rewrite of calling code.

func (*MockTB) Error

func (m *MockTB) Error(va ...interface{})

func (*MockTB) Errorf

func (m *MockTB) Errorf(f string, va ...interface{})

func (*MockTB) Fail

func (m *MockTB) Fail()

func (*MockTB) FailNow

func (m *MockTB) FailNow()

func (*MockTB) Failed

func (m *MockTB) Failed() bool

func (*MockTB) Fatal

func (m *MockTB) Fatal(va ...interface{})

func (*MockTB) Fatalf

func (m *MockTB) Fatalf(f string, va ...interface{})

func (*MockTB) Helper

func (m *MockTB) Helper()

func (*MockTB) Log

func (m *MockTB) Log(va ...interface{})

func (*MockTB) Logf

func (m *MockTB) Logf(f string, va ...interface{})

func (*MockTB) Name

func (m *MockTB) Name() string

func (*MockTB) Skip

func (m *MockTB) Skip(va ...interface{})

func (*MockTB) SkipNow

func (m *MockTB) SkipNow()

func (*MockTB) Skipf

func (m *MockTB) Skipf(f string, va ...interface{})

func (*MockTB) Skipped

func (m *MockTB) Skipped() bool

func (*MockTB) Underlying

func (m *MockTB) Underlying(tb TB)

Sets underlying log. Not part of TB interface

type TB

type TB interface {
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Fail()
	FailNow()
	Failed() bool
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Log(args ...interface{})
	Logf(format string, args ...interface{})
	Name() string
	Skip(args ...interface{})
	SkipNow()
	Skipf(format string, args ...interface{})
	Skipped() bool
	Helper()
}

Copied from testing package, minus the private method that makes it unimplementable (why?!) Used for easier testing of CheckFormattingErrs, etc.

TB is the interface common to testing.T and testing.B.

type TBLogAdapter

type TBLogAdapter struct {
	ContinueOnErr bool
}

func (*TBLogAdapter) Error

func (tl *TBLogAdapter) Error(va ...interface{})

func (*TBLogAdapter) Errorf

func (tl *TBLogAdapter) Errorf(f string, va ...interface{})

func (*TBLogAdapter) Fail

func (*TBLogAdapter) Fail()

func (*TBLogAdapter) FailNow

func (*TBLogAdapter) FailNow()

func (*TBLogAdapter) Failed

func (*TBLogAdapter) Failed() bool

func (*TBLogAdapter) Fatal

func (*TBLogAdapter) Fatal(va ...interface{})

func (*TBLogAdapter) Fatalf

func (*TBLogAdapter) Fatalf(f string, va ...interface{})

func (*TBLogAdapter) Helper

func (*TBLogAdapter) Helper()

func (*TBLogAdapter) Log

func (*TBLogAdapter) Log(va ...interface{})

func (*TBLogAdapter) Logf

func (*TBLogAdapter) Logf(f string, va ...interface{})

func (*TBLogAdapter) Name

func (*TBLogAdapter) Name() string

func (*TBLogAdapter) Skip

func (*TBLogAdapter) Skip(va ...interface{})

func (*TBLogAdapter) SkipNow

func (*TBLogAdapter) SkipNow()

func (*TBLogAdapter) Skipf

func (*TBLogAdapter) Skipf(f string, va ...interface{})

func (*TBLogAdapter) Skipped

func (*TBLogAdapter) Skipped() bool

Directories

Path Synopsis
Package fakeupd creates a fake .upd file with enough content to keep factory restore happy and to boot to a point where it can print a message.
Package fakeupd creates a fake .upd file with enough content to keep factory restore happy and to boot to a point where it can print a message.
consts
Package consts contains consts used with fake update.
Package consts contains consts used with fake update.
Package integ contains integ tests run by mage.
Package integ contains integ tests run by mage.
helper/erase
prepare for erase integ test - create filesystem on recovery, write pattern on main volume
prepare for erase integ test - create filesystem on recovery, write pattern on main volume
Package vm contains utility functions used in integ tests with qemu VMs.
Package vm contains utility functions used in integ tests with qemu VMs.

Jump to

Keyboard shortcuts

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