wip: add process check posture

This commit is contained in:
bcmmbaga
2024-03-12 15:19:22 +03:00
parent 5dde044fa5
commit 5f0eec0add
4 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package posture
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/netbirdio/netbird/management/server/peer"
)
func TestProcessCheck_Check(t *testing.T) {
tests := []struct {
name string
input peer.Peer
check ProcessCheck
wantErr bool
isValid bool
}{
{},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
isValid, err := tt.check.Check(tt.input)
if tt.wantErr {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
assert.Equal(t, tt.isValid, isValid)
})
}
}