refactor(v2): upgrade module to github.com/alibaba/higress/v2 (#2922)

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
This commit is contained in:
Xijun Dai
2025-09-21 14:29:07 +08:00
committed by GitHub
parent cd2082033c
commit 47827ad271
235 changed files with 1077 additions and 1045 deletions

View File

@@ -17,10 +17,10 @@ package tests
import (
"testing"
"github.com/alibaba/higress/pkg/ingress/kube/configmap"
"github.com/alibaba/higress/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/pkg/ingress/kube/configmap"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,11 +17,11 @@ package tests
import (
"testing"
"github.com/alibaba/higress/pkg/ingress/kube/configmap"
"github.com/alibaba/higress/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/pkg/ingress/kube/configmap"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -31,7 +31,6 @@ var ConfigmapHttps = suite.ConformanceTest{
Manifests: []string{"tests/configmap-https.yaml"},
Features: []suite.SupportedFeature{suite.HTTPConformanceFeature},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
testCases := []struct {
httpAssert http.Assertion
}{

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
// The llm-mock service response has a fixed id of `chatcmpl-llm-mock`.

View File

@@ -15,11 +15,11 @@
package tests
import (
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -15,9 +15,10 @@
package tests
import (
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"testing"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -18,8 +18,8 @@ import (
"net/url"
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
const (

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -18,8 +18,8 @@ import (
stdHttp "net/http"
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -19,8 +19,8 @@ import (
"encoding/base64"
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,10 +17,10 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
"sigs.k8s.io/controller-runtime/pkg/client"
)
@@ -75,9 +75,11 @@ var WasmPluginsSniMisdirect = suite.ConformanceTest{
SNI: "foo.com",
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},
@@ -107,9 +109,11 @@ var WasmPluginsSniMisdirect = suite.ConformanceTest{
SNI: "foo.com",
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},
@@ -139,9 +143,11 @@ var WasmPluginsSniMisdirect = suite.ConformanceTest{
SNI: "foo.com",
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -263,7 +263,6 @@ var WasmPluginsTransformer = suite.ConformanceTest{
},
Response: http.AssertionResponse{
ExpectedResponse: http.Response{
StatusCode: 200,
},
},

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -48,7 +48,8 @@ var HTTPRouteCanaryHeaderWithCustomizedHeader = suite.ConformanceTest{
StatusCode: 404,
},
},
}, {
},
{
Request: http.AssertionRequest{
ActualRequest: http.Request{
Path: "/echo",

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -20,10 +20,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -60,9 +60,11 @@ var HTTPRouteDownstreamEncryption = suite.ConformanceTest{
SNI: "foo1.com",
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},
@@ -98,9 +100,11 @@ var HTTPRouteDownstreamEncryption = suite.ConformanceTest{
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},
@@ -136,9 +140,11 @@ var HTTPRouteDownstreamEncryption = suite.ConformanceTest{
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305},
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},
@@ -175,9 +181,11 @@ var HTTPRouteDownstreamEncryption = suite.ConformanceTest{
CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384},
Certificates: http.Certificates{
CACerts: [][]byte{caCertOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes()},
ClientKeyPairs: []http.ClientKeyPair{
{
ClientCert: cliCertOut.Bytes(),
ClientKey: cliKeyOut.Bytes(),
},
},
},
},

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -120,6 +120,5 @@ var HTTPRouteEnableCors = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -108,6 +108,5 @@ var HTTPRouteEnableIgnoreCase = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -18,8 +18,8 @@ import (
"testing"
"time"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -63,6 +63,5 @@ var HttpForceRedirectHttps = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -84,7 +84,6 @@ var HTTPRouteFullPathRegex = suite.ConformanceTest{
for _, testCase := range testCases {
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testCase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -48,7 +48,8 @@ var HTTPRouteHostNameSameNamespace = suite.ConformanceTest{
StatusCode: 200,
},
},
}, {
},
{
Meta: http.AssertionMeta{
TargetBackend: "infra-backend-v2",
TargetNamespace: "higress-conformance-infra",
@@ -64,7 +65,8 @@ var HTTPRouteHostNameSameNamespace = suite.ConformanceTest{
StatusCode: 200,
},
},
}, {
},
{
Meta: http.AssertionMeta{
TargetBackend: "infra-backend-v2",
TargetNamespace: "higress-conformance-infra",
@@ -80,7 +82,8 @@ var HTTPRouteHostNameSameNamespace = suite.ConformanceTest{
StatusCode: 200,
},
},
}, {
},
{
Meta: http.AssertionMeta{
TargetBackend: "infra-backend-v3",
TargetNamespace: "higress-conformance-infra",
@@ -96,7 +99,8 @@ var HTTPRouteHostNameSameNamespace = suite.ConformanceTest{
StatusCode: 200,
},
},
}, {
},
{
Meta: http.AssertionMeta{
TargetBackend: "infra-backend-v1",
TargetNamespace: "higress-conformance-infra",
@@ -129,7 +133,8 @@ var HTTPRouteHostNameSameNamespace = suite.ConformanceTest{
StatusCode: 200,
},
},
}, {
},
{
Meta: http.AssertionMeta{
TargetBackend: "infra-backend-v3",
TargetNamespace: "higress-conformance-infra",

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -19,10 +19,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/cert"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -20,18 +20,17 @@ import (
"encoding/json"
"fmt"
"io"
"sync/atomic"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"net/url"
"log"
"math/rand"
"net/http"
"net/url"
"sync"
"sync/atomic"
"testing"
"time"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -45,7 +44,7 @@ var HttpRouteLimiter = suite.ConformanceTest{
Manifests: []string{"tests/httproute-limit.yaml"},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
t.Run("HTTPRoute limiter", func(t *testing.T) {
//wait ingress ready
// wait ingress ready
time.Sleep(1 * time.Second)
client := &http.Client{}
TestRps10(t, suite.GatewayAddress, client)

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -72,7 +72,8 @@ var HTTPRouteMatchHeaders = suite.ConformanceTest{
TargetBackend: "infra-backend-v1",
TargetNamespace: "higress-conformance-infra",
},
}, {
},
{
Request: http.AssertionRequest{
ActualRequest: http.Request{
Path: "/foo",

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -51,7 +51,8 @@ var HTTPRouteMatchMethods = suite.ConformanceTest{
TargetBackend: "infra-backend-v1",
TargetNamespace: "higress-conformance-infra",
},
}, {
},
{
Request: http.AssertionRequest{
ActualRequest: http.Request{
Path: "/foo",

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -139,6 +139,5 @@ var HTTPRouteMatchPath = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -22,8 +22,8 @@ import (
"testing"
"time"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
@@ -62,7 +62,7 @@ var HTTPRouteMirrorTargetService = suite.ConformanceTest{
t.Run("HTTPRoute mirror request to target service", func(t *testing.T) {
for _, testcase := range testcases {
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
//check mirror's logs for request
// check mirror's logs for request
cfg, err := config.GetConfig()
if err != nil {
t.Fatalf("[httproute-mirror] get config failed.")

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -63,6 +63,5 @@ var HttpRedirectAsHttps = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -57,7 +57,6 @@ var HTTPRouteRewritePath = suite.ConformanceTest{
for _, testCase := range testCases {
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testCase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,9 +17,9 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -15,9 +15,10 @@
package tests
import (
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"testing"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -74,6 +75,5 @@ var HttpTimeout = suite.ConformanceTest{
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase)
}
})
},
}

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/envoy"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {
@@ -62,7 +62,7 @@ var RustWasmPluginsAiDataMasking = suite.ConformanceTest{
Features: []suite.SupportedFeature{suite.WASMRustConformanceFeature},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
var testcases []http.Assertion
//openai
// openai
testcases = append(testcases, gen_assertion(
"replace.openai.com",
true,
@@ -113,7 +113,7 @@ var RustWasmPluginsAiDataMasking = suite.ConformanceTest{
[]byte("{\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"costom_word\"}}],\"usage\":{}}"),
))
//raw
// raw
testcases = append(testcases, gen_assertion(
"replace.raw.com",
false,
@@ -172,7 +172,7 @@ var RustWasmPluginsAiDataMasking = suite.ConformanceTest{
[]byte("{\"res\":\"costom_word\"}"),
))
//jsonpath
// jsonpath
testcases = append(testcases, gen_assertion(
"replace.raw.com",
true,

View File

@@ -17,8 +17,8 @@ package tests
import (
"testing"
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/http"
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
)
func init() {

View File

@@ -14,7 +14,7 @@
package tests
import "github.com/alibaba/higress/test/e2e/conformance/utils/suite"
import "github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
func Register(testcase suite.ConformanceTest) {
if len(testcase.Features) == 0 {