Skip to content

Commit

Permalink
Skip test if inside a Nitro Enclave.
Browse files Browse the repository at this point in the history
  • Loading branch information
NullHypothesis committed Dec 8, 2024
1 parent 704f895 commit cd7cafd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/service/handle/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ func TestEncodeAndAttest(t *testing.T) {
err := json.Unmarshal([]byte(resp.Header.Get(attestationHeader)), &rawDoc)
require.NoError(t, err)

// The call to Verify is going to fail if we're inside a Nitro
// Enclave because the attestation document was produced in debug
// mode, which we need to see the test output.
if attester.Type() == enclave.TypeNitro {
return
}
doc, err := attester.Verify(&rawDoc, c.nonce)
require.NoError(t, err)

Expand Down

0 comments on commit cd7cafd

Please sign in to comment.