tests and api fix

This commit is contained in:
redanthrax 2022-06-21 17:05:26 -07:00
parent c36ee74c5a
commit 66aca05028
5 changed files with 118 additions and 22 deletions

View file

@ -0,0 +1,30 @@
package network_test
import (
"testing"
"github.com/amidaware/rmmagent/agent/network"
)
func TestPublicIP(t *testing.T) {
testTable := []struct {
name string
expected string
proxy string
}{
{
name: "Get Public IP",
expected: network.PublicIP(""),
proxy: "",
},
}
for _, tt := range testTable {
t.Run(tt.name, func(t *testing.T) {
result := network.PublicIP(tt.proxy)
if result != tt.expected {
t.Errorf("expected %s, got %s", tt.expected, result)
}
})
}
}