mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-15 11:21:04 +01:00
26 lines
528 B
Go
26 lines
528 B
Go
|
package system
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
log "github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
func Test_sysInfo(t *testing.T) {
|
||
|
serialNum, err := sysNumber()
|
||
|
if err != nil {
|
||
|
t.Errorf("failed to get system serial number: %s", err)
|
||
|
}
|
||
|
|
||
|
prodName, err := sysProductName()
|
||
|
if err != nil {
|
||
|
t.Errorf("failed to get system product name: %s", err)
|
||
|
}
|
||
|
|
||
|
manufacturer, err := sysManufacturer()
|
||
|
if err != nil {
|
||
|
t.Errorf("failed to get system manufacturer: %s", err)
|
||
|
}
|
||
|
log.Infof("Windows sys info: %s, %s, %s", serialNum, prodName, manufacturer)
|
||
|
}
|