mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-24 04:55:28 +02:00
[client] Get static system info once (#2965)
Get static system info once for Windows, Darwin, and Linux nodes This should improve startup and peer authentication times
This commit is contained in:
@@ -183,7 +183,10 @@ func Test_sysInfo(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
gotSerialNum, gotProdName, gotManufacturer := sysInfo(tt.sysInfo)
|
||||
getSystemInfo = func() SysInfo {
|
||||
return tt.sysInfo
|
||||
}
|
||||
gotSerialNum, gotProdName, gotManufacturer := sysInfo()
|
||||
if gotSerialNum != tt.wantSerialNum {
|
||||
t.Errorf("sysInfo() gotSerialNum = %v, want %v", gotSerialNum, tt.wantSerialNum)
|
||||
}
|
||||
|
Reference in New Issue
Block a user