Improve tests

This commit is contained in:
世界 2023-09-07 22:37:19 +08:00
parent 189676578a
commit 88d39f1c73
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 6 additions and 6 deletions

View File

@ -32,8 +32,8 @@ const (
ImageTrojan = "trojangfw/trojan:latest"
ImageNaive = "pocat/naiveproxy:client"
ImageBoringTun = "ghcr.io/ntkme/boringtun:edge"
ImageHysteria = "teddysun/hysteria:1.3.5"
ImageHysteria2 = "teddysun/hysteria:latest"
ImageHysteria = "tobyxdd/hysteria:v1.3.5"
ImageHysteria2 = "tobyxdd/hysteria:v2"
ImageNginx = "nginx:stable"
ImageShadowTLS = "ghcr.io/ihciah/shadow-tls:latest"
ImageShadowsocksR = "teddysun/shadowsocks-r:latest"
@ -378,7 +378,7 @@ func testLargeDataWithPacketConnSize(t *testing.T, port uint16, chunkSize int, p
rAddr := &net.UDPAddr{IP: localIP.AsSlice(), Port: int(port)}
times := 2
times := 50
pingCh, pongCh, test := newLargeDataPair()
writeRandData := func(pc net.PacketConn, addr net.Addr) (map[int][]byte, error) {

View File

@ -244,5 +244,5 @@ func TestECHHysteria2(t *testing.T) {
},
},
})
testSuit(t, clientPort, testPort)
testSuitLargeUDP(t, clientPort, testPort)
}

View File

@ -127,7 +127,7 @@ func TestHysteria2Inbound(t *testing.T) {
startDockerContainer(t, DockerOptions{
Image: ImageHysteria2,
Ports: []uint16{serverPort, clientPort},
Cmd: []string{"hysteria", "client", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
Cmd: []string{"client", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
Bind: map[string]string{
"hysteria2-client.yml": "/etc/hysteria/config.yml",
caPem: "/etc/hysteria/ca.pem",
@ -141,7 +141,7 @@ func TestHysteria2Outbound(t *testing.T) {
startDockerContainer(t, DockerOptions{
Image: ImageHysteria2,
Ports: []uint16{testPort},
Cmd: []string{"hysteria", "server", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
Cmd: []string{"server", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
Bind: map[string]string{
"hysteria2-server.yml": "/etc/hysteria/config.yml",
certPem: "/etc/hysteria/cert.pem",