mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-21 13:34:48 -04:00
attestation: allow "go test" to work with CGO disabled
This commit is contained in:
parent
1d5f244879
commit
75ed8c9f3e
7 changed files with 55 additions and 0 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/attestation/idkeydigest"
|
||||
|
@ -31,6 +32,10 @@ import (
|
|||
)
|
||||
|
||||
func TestTrustedKeyFromSNP(t *testing.T) {
|
||||
cgo := os.Getenv("CGO_ENABLED")
|
||||
if cgo == "0" {
|
||||
t.Skip("skipping test because CGO is disabled and tpm simulator requires it")
|
||||
}
|
||||
require := require.New(t)
|
||||
|
||||
tpm, err := simulator.OpenSimulatedTPM()
|
||||
|
@ -237,6 +242,10 @@ func TestTrustedKeyFromSNP(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestValidateAk(t *testing.T) {
|
||||
cgo := os.Getenv("CGO_ENABLED")
|
||||
if cgo == "0" {
|
||||
t.Skip("skipping test because CGO is disabled and tpm simulator requires it")
|
||||
}
|
||||
require := require.New(t)
|
||||
|
||||
tpm, err := simulator.OpenSimulatedTPM()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue