Compare commits
6 Commits
2ba85969d6
...
737bec0d2e
Author | SHA1 | Date | |
---|---|---|---|
|
737bec0d2e | ||
|
0b76fa08ee | ||
|
4f1f4f36ef | ||
|
a485af5591 | ||
|
bf33a3b8ec | ||
|
333455ae73 |
2
Makefile
2
Makefile
@ -21,7 +21,7 @@ TEST_EXPECTED := '{"code":200,'
|
||||
|
||||
all:
|
||||
@BUILD_PATH=$(BUILD_PATH)/aarch64 TARGET_ARCH=aarch64 GOARCH=arm64 $(MAKE) -e shared
|
||||
@BUILD_PATH=$(BUILD_PATH)/armv7a TARGET_ARCH=armv7a GOARCH=arm TARGET_SDK=androideabi23 $(MAKE) -e shared
|
||||
@BUILD_PATH=$(BUILD_PATH)/armv7a TARGET_ARCH=armv7a GOARCH=arm GOARM=7 TARGET_SDK=androideabi23 $(MAKE) -e shared
|
||||
@BUILD_PATH=$(BUILD_PATH)/i686 TARGET_ARCH=i686 GOARCH=amd64 $(MAKE) -e shared
|
||||
@BUILD_PATH=$(BUILD_PATH)/x86_64 TARGET_ARCH=x86_64 GOARCH=386 $(MAKE) -e shared
|
||||
rm -rf $(BUILD_PATH)/*/*.h
|
||||
|
@ -42,6 +42,12 @@ func TestDNS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBadDNS(t *testing.T) {
|
||||
dotv6serversbak := dotv6servers.m
|
||||
dotv4serversbak := dotv4servers.m
|
||||
defer func() {
|
||||
dotv6servers.m = dotv6serversbak
|
||||
dotv4servers.m = dotv4serversbak
|
||||
}()
|
||||
if canUseIPv6.Get() {
|
||||
dotv6servers = dnsservers{
|
||||
m: map[string][]*dnsstat{},
|
||||
|
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
@ -44,7 +45,12 @@ func TestRequest(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if c.C != http.StatusOK {
|
||||
t.Fatal("status code", c.C)
|
||||
s, err := base64.StdEncoding.DecodeString(c.D)
|
||||
if err != nil {
|
||||
t.Fatal("status code", c.C, "msg:", c.D)
|
||||
} else {
|
||||
t.Fatal("status code", c.C, "msg:", s)
|
||||
}
|
||||
}
|
||||
if len(c.D) == 0 {
|
||||
t.Fatal("empty data")
|
||||
|
Loading…
Reference in New Issue
Block a user