Skip to content

Commit

Permalink
Initialize logging in verify_test
Browse files Browse the repository at this point in the history
This avoids warning messages for logging before initialization.

Signed-off-by: Dionna Glaze <[email protected]>
  • Loading branch information
deeglaze committed Dec 13, 2022
1 parent 1d32957 commit 7471382
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions verify/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"encoding/asn1"
"math/big"
"math/rand"
"os"
"strings"
"sync"
"testing"
Expand All @@ -34,6 +35,7 @@ import (
test "github.com/google/go-sev-guest/testing"
testclient "github.com/google/go-sev-guest/testing/client"
"github.com/google/go-sev-guest/verify/trust"
"github.com/google/logger"
)

// These certificates are committed regardless of its expiration date since we adjust the
Expand Down Expand Up @@ -61,6 +63,11 @@ func initSigner() {
signer = newSigner
}

func TestMain(m *testing.M) {
logger.Init("VerifyTestLog", false, false, os.Stderr)
os.Exit(m.Run())
}

func TestEmbeddedCertsAppendixB3Expectations(t *testing.T) {
// https://www.amd.com/system/files/TechDocs/55766_SEV-KM_API_Specification.pdf
// Appendix B.1
Expand Down

0 comments on commit 7471382

Please sign in to comment.