mirror of
https://github.com/alibaba/higress.git
synced 2026-04-21 20:17:29 +08:00
refactor(v2): upgrade module to github.com/alibaba/higress/v2 (#2922)
Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
}{
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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(),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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(),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/alibaba/higress/hgctl/cmd/hgctl/config"
|
||||
cfg "github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
cfg "github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
"github.com/tidwall/gjson"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
)
|
||||
|
||||
@@ -27,8 +27,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
|
||||
)
|
||||
|
||||
type Assertion struct {
|
||||
@@ -200,7 +200,7 @@ func MakeRequestAndExpectEventuallyConsistentResponse(t *testing.T, r roundtripp
|
||||
|
||||
if expected.Request.ActualRequest.Body != nil && len(expected.Request.ActualRequest.Body) > 0 {
|
||||
if len(expected.Request.ActualRequest.ContentType) == 0 {
|
||||
t.Error(`please set Content-Type in ActualRequest manually if you want to send a request with body.
|
||||
t.Error(`please set Content-Type in ActualRequest manually if you want to send a request with body.
|
||||
For example, \"ContentType: http.ContentTypeApplicationJson\"`)
|
||||
}
|
||||
}
|
||||
@@ -309,7 +309,7 @@ func WaitForConsistentResponse(t *testing.T, r roundtripper.RoundTripper, req ro
|
||||
// CompareTarget为Response时,不支持设定ExpectedRequest断言,ExpectedResponse中设置的所有断言均支持。支持任意backend,如echo-body
|
||||
if expected.Meta.CompareTarget == CompareTargetRequest {
|
||||
if expected.Response.ExpectedResponse.Body != nil {
|
||||
t.Logf(`detected CompareTarget is Request, but ExpectedResponse.Body is set.
|
||||
t.Logf(`detected CompareTarget is Request, but ExpectedResponse.Body is set.
|
||||
You can only choose one to compare between Response and Request.`)
|
||||
return false
|
||||
}
|
||||
@@ -325,7 +325,7 @@ func WaitForConsistentResponse(t *testing.T, r roundtripper.RoundTripper, req ro
|
||||
}
|
||||
} else if expected.Meta.CompareTarget == CompareTargetResponse {
|
||||
if expected.Request.ExpectedRequest != nil {
|
||||
t.Logf(`detected CompareTarget is Response, but ExpectedRequest is set.
|
||||
t.Logf(`detected CompareTarget is Response, but ExpectedRequest is set.
|
||||
You can only choose one to compare between Response and Request.`)
|
||||
return false
|
||||
}
|
||||
@@ -728,6 +728,7 @@ func ParseFormUrlencodedBody(body []byte) (map[string][]string, error) {
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func ParseMultipartFormBody(body []byte, boundary string) (map[string][]string, error) {
|
||||
ret := make(map[string][]string)
|
||||
mr := multipart.NewReader(bytes.NewReader(body), boundary)
|
||||
@@ -755,7 +756,6 @@ func ParseMultipartFormBody(body []byte, boundary string) (map[string][]string,
|
||||
|
||||
// Get User-defined test case name or generate from expected response to a given request.
|
||||
func (er *Assertion) GetTestCaseName(i int) string {
|
||||
|
||||
// If TestCase name is provided then use that or else generate one.
|
||||
if er.Meta.TestCaseName != "" {
|
||||
return er.Meta.TestCaseName
|
||||
|
||||
@@ -17,7 +17,7 @@ package http
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -688,7 +688,7 @@ func TestCompareResponse(t *testing.T) {
|
||||
"X-header-test2": {"h2", "h22"},
|
||||
"Content-Type": {"application/json"},
|
||||
},
|
||||
Body: []byte(`
|
||||
Body: []byte(`
|
||||
{
|
||||
"X-body-test1":["b1"],
|
||||
"X-body-test2":["b2", "b22"]
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
ingress "github.com/alibaba/higress/test/e2e/conformance"
|
||||
ingress "github.com/alibaba/higress/v2/test/e2e/conformance"
|
||||
"github.com/stretchr/testify/require"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/yaml"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
)
|
||||
|
||||
// Applier prepares manifests depending on the available options and applies
|
||||
|
||||
@@ -14,5 +14,5 @@ limitations under the License.
|
||||
package kubernetes
|
||||
|
||||
import (
|
||||
_ "github.com/alibaba/higress/test/e2e/conformance/utils/flags"
|
||||
_ "github.com/alibaba/higress/v2/test/e2e/conformance/utils/flags"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// ensure auth plugins are loaded
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/cert"
|
||||
)
|
||||
|
||||
// MustCreateSelfSignedCertSecret creates a self-signed SSL certificate and stores it in a secret
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
)
|
||||
|
||||
// FilterStaleConditions returns the list of status condition whos observedGeneration does not
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
|
||||
"golang.org/x/net/http2"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
)
|
||||
|
||||
// RoundTripper is an interface used to make requests within conformance tests.
|
||||
|
||||
@@ -18,9 +18,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/config"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/kubernetes"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/roundtripper"
|
||||
"istio.io/istio/pkg/util/sets"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
)
|
||||
@@ -29,7 +29,7 @@ const (
|
||||
TestAreaAll = "all"
|
||||
TestAreaSetup = "setup"
|
||||
TestAreaRun = "run"
|
||||
TessAreaClean = "clean"
|
||||
TestAreaClean = "clean"
|
||||
)
|
||||
|
||||
// ConformanceTestSuite defines the test suite used to run Gateway API
|
||||
|
||||
@@ -24,9 +24,9 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client/config"
|
||||
|
||||
"github.com/alibaba/higress/test/e2e/conformance/tests"
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/flags"
|
||||
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/tests"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/flags"
|
||||
"github.com/alibaba/higress/v2/test/e2e/conformance/utils/suite"
|
||||
)
|
||||
|
||||
func TestHigressConformanceTests(t *testing.T) {
|
||||
@@ -68,7 +68,7 @@ func TestHigressConformanceTests(t *testing.T) {
|
||||
case suite.TestAreaSetup:
|
||||
cSuite.Cleanup = false
|
||||
cSuite.Setup(t)
|
||||
case suite.TessAreaClean:
|
||||
case suite.TestAreaClean:
|
||||
cSuite.Clean(t)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user