testutil

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserKeyring = -4
)

Variables

View Source
var HasKey = &hasKeyChecker{
	&CheckerInfo{Name: "HasKey", Params: []string{"map", "key"}}}
View Source
var IsTrue Checker = &isTrueChecker{
	&CheckerInfo{Name: "IsTrue", Params: []string{"value"}}}
View Source
var RandReader = &testRng{}

Functions

func CopyFile

func CopyFile(dst, src string, perm os.FileMode) error

func DecodeHexString

func DecodeHexString(c *C, s string) []byte

func DecodeHexStringT

func DecodeHexStringT(t *testing.T, s string) []byte

func EFIReadVar

func EFIReadVar(dir, name string, guid efi.GUID) ([]byte, efi.VariableAttributes, error)

func GetKeyringKeys

func GetKeyringKeys(c *C, keyringId int) (out []int)

func InSlice

func InSlice(checker Checker) Checker

InSlice determines whether a value is contained in the provided slice, using the specified checker.

For example:

c.Check(value, InSlice(Equals), []int{1, 2, 3})

func MakeMockCore20ModelAssertion

func MakeMockCore20ModelAssertion(c *C, headers map[string]interface{}, signKeyHash string) secboot.SnapModel

Types

type KeyringTestBase

type KeyringTestBase struct {
	testutil.BaseTest
	ProcessPossessesUserKeyringKeys bool
}

func (*KeyringTestBase) SetUpSuite

func (b *KeyringTestBase) SetUpSuite(c *C)

func (*KeyringTestBase) SetUpTest

func (b *KeyringTestBase) SetUpTest(c *C)

Jump to

Keyboard shortcuts

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