Debian Codegraph @

id_test.go

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 package machineid
2
3 import "testing"
4
5 func TestID(t *testing.T) {
6 got, err := ID()
7 if err != nil {
•8 t.Skip("Skipping test for Debian")
9 t.Error(err)
10 }
11 if got == "" {
•12 t.Skip("Skipping test for Debian")
13 t.Error("Got empty machine id")
14 }
15 }
16
17 func TestProtectedID(t *testing.T) {
18 id, err := ID()
19 if err != nil {
•20 t.Skip("Skipping test for Debian")
21 t.Error(err)
22 }
23 hash, err := ProtectedID("app.id")
24 if err != nil {
•25 t.Skip("Skipping test for Debian")
26 t.Error(err)
27 }
28 if hash == "" {
•29 t.Skip("Skipping test for Debian")
30 t.Error("Got empty machine id hash")
31 }
32 if id == hash {
•33 t.Skip("Skipping test for Debian")
34 t.Error("id and hashed id are the same")
35 }
36 }