Documentation ¶
Overview ¶
Package client (in testing) allows tests to get a fake or real sev-guest device.
Index ¶
- func GetSevGuest(tcs []test.TestCase, opts *test.DeviceOptions, tb testing.TB) (client.Device, map[string][]*trust.AMDRootCerts, ...)
- func GetSevQuoteProvider(tcs []test.TestCase, opts *test.DeviceOptions, tb testing.TB) (client.QuoteProvider, map[string][]*trust.AMDRootCerts, ...)
- func SkipUnmockableTestCase(tc *test.TestCase) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSevGuest ¶
func GetSevGuest(tcs []test.TestCase, opts *test.DeviceOptions, tb testing.TB) (client.Device, map[string][]*trust.AMDRootCerts, map[string][]*trust.AMDRootCerts, trust.HTTPSGetter)
GetSevGuest is a cross-platform testing helper function that retrieves the appropriate SEV-guest device from the flags passed into "go test".
If using a test guest device, this will also produce a fake AMD-SP that produces the signed versions of given attestation reports based on different nonce input. Its returned roots of trust are based on the fake's signing credentials.
func GetSevQuoteProvider ¶ added in v0.10.0
func GetSevQuoteProvider(tcs []test.TestCase, opts *test.DeviceOptions, tb testing.TB) (client.QuoteProvider, map[string][]*trust.AMDRootCerts, map[string][]*trust.AMDRootCerts, trust.HTTPSGetter)
GetSevQuoteProvider is a cross-platform testing helper function that retrieves the appropriate SEV-guest device from the flags passed into "go test".
If using a test guest device, this will also produce a fake AMD-SP that produces the signed versions of given attestation reports based on different nonce input. Its returned roots of trust are based on the fake's signing credentials.
func SkipUnmockableTestCase ¶
SkipUnmockableTestCase returns whether we have to skip a mocked failure test case on real hardware.
Types ¶
This section is empty.