mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-01 20:52:10 -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
|
@ -15,6 +15,7 @@ import (
|
|||
"crypto/x509/pkix"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -32,6 +33,10 @@ import (
|
|||
)
|
||||
|
||||
func TestGetAttestationCert(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()
|
||||
require.NoError(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue