Skip to content

Commit 115a0e2

Browse files
authored
Merge pull request #7 from deeglaze/fix_tests
Fix client_test after PR#6
2 parents 532e68a + d531ac1 commit 115a0e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

client/client_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func TestGetDerivedKey(t *testing.T) {
163163
UseVCEK: true,
164164
})
165165
if err != nil {
166-
t.Fatal("Could not get key1: %v", err)
166+
t.Fatalf("Could not get key1: %v", err)
167167
}
168168
key2, err := GetDerivedKeyAcknowledgingItsLimitations(device, &SnpDerivedKeyReq{
169169
UseVCEK: true,
@@ -180,10 +180,10 @@ func TestGetDerivedKey(t *testing.T) {
180180
if err != nil {
181181
t.Fatalf("Could not get key3: %v", err)
182182
}
183-
if bytes.Equal(key1, key2) {
184-
t.Errorf("GetDerivedKey...(nothing) = %v = GetDerivedKey...(guestPolicy) = %v", key1, key2)
183+
if bytes.Equal(key1.Data[:], key2.Data[:]) {
184+
t.Errorf("GetDerivedKey...(nothing) = %v = GetDerivedKey...(guestPolicy) = %v", key1.Data, key2.Data)
185185
}
186-
if !bytes.Equal(key1, key3) {
187-
t.Errorf("GetDerivedKey...(nothing) = %v and %v. Expected equality", key1, key3)
186+
if !bytes.Equal(key1.Data[:], key3.Data[:]) {
187+
t.Errorf("GetDerivedKey...(nothing) = %v and %v. Expected equality", key1.Data, key3.Data)
188188
}
189189
}

0 commit comments

Comments
 (0)