testenv

package
v1.3.3-0...-3aec24a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type E

type E struct {
	DevicesClient devicepb.DeviceTrustServiceClient
	// contains filtered or unexported fields
}

E is an integrated test environment for device trust.

func MustNew

func MustNew() *E

MustNew creates a new E or panics. Callers are required to defer e.Close() to release test resources.

func New

func New() (*E, error)

New creates a new E. Callers are required to defer e.Close() to release test resources.

func (*E) Close

func (e *E) Close() error

Close tears down the test environment.

type FakeMacOSDevice

type FakeMacOSDevice struct {
	ID           string
	SerialNumber string
	PubKeyDER    []byte
	// contains filtered or unexported fields
}

FakeMacOSDevice fakes the native methods of a macOS device, as expected by the devicetrust packages.

func NewFakeMacOSDevice

func NewFakeMacOSDevice() (*FakeMacOSDevice, error)

func (*FakeMacOSDevice) CollectDeviceData

func (f *FakeMacOSDevice) CollectDeviceData() (*devicepb.DeviceCollectedData, error)

func (*FakeMacOSDevice) DeviceCredential

func (f *FakeMacOSDevice) DeviceCredential() *devicepb.DeviceCredential

func (*FakeMacOSDevice) EnrollDeviceInit

func (f *FakeMacOSDevice) EnrollDeviceInit() (*devicepb.EnrollDeviceInit, error)

func (*FakeMacOSDevice) GetOSType

func (f *FakeMacOSDevice) GetOSType() devicepb.OSType

func (*FakeMacOSDevice) SignChallenge

func (f *FakeMacOSDevice) SignChallenge(chal []byte) (sig []byte, err error)

Jump to

Keyboard shortcuts

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