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