more tests
This commit is contained in:
parent
2e095270f5
commit
234f524a0e
7 changed files with 161 additions and 4 deletions
31
agent/tactical/rpc/rpc_test.go
Normal file
31
agent/tactical/rpc/rpc_test.go
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package rpc_test
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/amidaware/rmmagent/agent/tactical/rpc"
|
||||
)
|
||||
|
||||
func TestRunRPC(t *testing.T) {
|
||||
testTable := []struct {
|
||||
name string
|
||||
expectedError error
|
||||
version string
|
||||
}{
|
||||
{
|
||||
name: "Run RPC",
|
||||
expectedError: nil,
|
||||
version: "development",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range testTable {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
err := rpc.RunRPC(tt.version)
|
||||
if !errors.Is(tt.expectedError, err) {
|
||||
t.Errorf("expected (%v), got (%v)", tt.expectedError, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue