dnsupdater/internal/outboundip/ddwrt/iprequester_test.go

20 lines
352 B
Go

package ddwrt
import (
"fmt"
"net/http"
"testing"
"time"
)
func TestRequester_GetOutboundIp(t *testing.T) {
requester := NewIpRequester(&http.Client{
Timeout: 30 * time.Second,
}, "", "laurent", "&951753seiko38613861")
result := <-requester.GetOutboundIp()
fmt.Printf("%+v\n", result)
if result.Error != nil {
t.Error(result.Error)
}
}