You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/utils/goip/download_test.go

33 lines
978 B

package goip
import (
"github.com/dtapps/go-library/utils/goip/geoip"
"github.com/dtapps/go-library/utils/goip/ip2region"
"github.com/dtapps/go-library/utils/goip/ip2region_v2"
"github.com/dtapps/go-library/utils/goip/ipv6wry"
"github.com/dtapps/go-library/utils/goip/qqwry"
"testing"
)
func TestV4OnlineDownload(t *testing.T) {
qqwry.OnlineDownload()
}
func TestV6OnlineDownload(t *testing.T) {
ipv6wry.OnlineDownload()
}
func TestIp2regionOnlineDownload(t *testing.T) {
ip2region.OnlineDownload()
}
func TestIp2regionV2OnlineDownload(t *testing.T) {
ip2region_v2.OnlineDownload()
}
func TestGeoIpOnlineDownload(t *testing.T) {
geoip.OnlineDownload(geoip.GetGeoLite2CountryDownloadUrl("bb26plSFSVqDCJen"), "GeoLite2-Country_20230602.tar.gz")
geoip.OnlineDownload(geoip.GetGeoLite2CityDownloadUrl("bb26plSFSVqDCJen"), "GeoLite2-City_20230602.tar.gz")
geoip.OnlineDownload(geoip.GetGeoLite2AsnDownloadUrl("bb26plSFSVqDCJen"), "GeoLite2-ASN_20230602.tar.gz")
}