setup mac tests

This commit is contained in:
redanthrax 2022-06-28 14:52:31 -07:00
parent f20f589fbf
commit a22c10cd67
6 changed files with 62 additions and 32 deletions

View file

@ -4,7 +4,6 @@
package umi_test
import (
"reflect"
"testing"
"github.com/amidaware/rmmagent/agent/umi"
@ -15,27 +14,21 @@ func TestGetInfo(t *testing.T) {
name string
expected map[string]interface{}
atLeast int
expectedErrors []error
}{
{
name: "Get info",
expected: make(map[string]interface{}),
atLeast: 1,
expectedErrors: []error{},
},
}
for _, tt := range testTable {
t.Run(tt.name, func(t *testing.T) {
result, errs := umi.GetInfo()
result, _ := umi.GetInfo()
t.Logf("result: (%v)", result)
if len(result) < tt.atLeast {
t.Errorf("expected at least %d, got %d", tt.atLeast, len(result))
}
if !reflect.DeepEqual(tt.expectedErrors, errs) {
t.Errorf("expected (%v), got (%v)", tt.expectedErrors, errs)
}
})
}
}