mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
12
.github/workflows/build-and-test.yaml
vendored
12
.github/workflows/build-and-test.yaml
vendored
@@ -107,7 +107,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
ingress-conformance-test:
|
higress-conformance-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@@ -141,10 +141,10 @@ jobs:
|
|||||||
|
|
||||||
- run: git stash # restore patch
|
- run: git stash # restore patch
|
||||||
|
|
||||||
- name: "Run Ingress Conformance Tests"
|
- name: "Run Higress E2E Conformance Tests"
|
||||||
run: GOPROXY="https://proxy.golang.org,direct" make ingress-conformance-test
|
run: GOPROXY="https://proxy.golang.org,direct" make higress-conformance-test
|
||||||
|
|
||||||
ingress-wasmplugin-test:
|
higress-wasmplugin-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@@ -179,10 +179,10 @@ jobs:
|
|||||||
- run: git stash # restore patch
|
- run: git stash # restore patch
|
||||||
|
|
||||||
- name: "Run Ingress WasmPlugins Tests"
|
- name: "Run Ingress WasmPlugins Tests"
|
||||||
run: GOPROXY="https://proxy.golang.org,direct" make ingress-wasmplugin-test
|
run: GOPROXY="https://proxy.golang.org,direct" make higress-wasmplugin-test
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ingress-conformance-test,gateway-conformance-test,ingress-wasmplugin-test]
|
needs: [higress-conformance-test,gateway-conformance-test,higress-wasmplugin-test]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -199,13 +199,13 @@ include tools/lint.mk
|
|||||||
.PHONY: gateway-conformance-test
|
.PHONY: gateway-conformance-test
|
||||||
gateway-conformance-test:
|
gateway-conformance-test:
|
||||||
|
|
||||||
# ingress-conformance-test runs ingress api conformance tests.
|
# higress-conformance-test runs ingress api conformance tests.
|
||||||
.PHONY: ingress-conformance-test
|
.PHONY: higress-conformance-test
|
||||||
ingress-conformance-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev run-ingress-e2e-test delete-cluster
|
higress-conformance-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev run-higress-e2e-test delete-cluster
|
||||||
|
|
||||||
# ingress-wasmplugin-test runs ingress wasmplugin tests.
|
# higress-wasmplugin-test runs ingress wasmplugin tests.
|
||||||
.PHONY: ingress-wasmplugin-test
|
.PHONY: higress-wasmplugin-test
|
||||||
ingress-wasmplugin-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev-wasmplugin run-ingress-e2e-test-wasmplugin delete-cluster
|
higress-wasmplugin-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev-wasmplugin run-higress-e2e-test-wasmplugin delete-cluster
|
||||||
|
|
||||||
# create-cluster creates a kube cluster with kind.
|
# create-cluster creates a kube cluster with kind.
|
||||||
.PHONY: create-cluster
|
.PHONY: create-cluster
|
||||||
@@ -229,22 +229,22 @@ kube-load-image: $(tools/kind) ## Install the Higress image to a kind cluster us
|
|||||||
tools/hack/kind-load-image.sh registry.cn-hangzhou.aliyuncs.com/hinsteny/dubbo-provider-demo 0.0.1
|
tools/hack/kind-load-image.sh registry.cn-hangzhou.aliyuncs.com/hinsteny/dubbo-provider-demo 0.0.1
|
||||||
tools/hack/kind-load-image.sh registry.cn-hangzhou.aliyuncs.com/hinsteny/nacos-standlone-rc3 1.0.0-RC3
|
tools/hack/kind-load-image.sh registry.cn-hangzhou.aliyuncs.com/hinsteny/nacos-standlone-rc3 1.0.0-RC3
|
||||||
|
|
||||||
# run-ingress-e2e-test starts to run ingress e2e tests.
|
# run-higress-e2e-test starts to run ingress e2e tests.
|
||||||
.PHONY: run-ingress-e2e-test
|
.PHONY: run-higress-e2e-test
|
||||||
run-ingress-e2e-test:
|
run-higress-e2e-test:
|
||||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||||
go test -v -tags conformance ./test/ingress/e2e_test.go --ingress-class=higress --debug=true
|
go test -v -tags conformance ./test/e2e/e2e_test.go --ingress-class=higress --debug=true
|
||||||
|
|
||||||
# run-ingress-e2e-test starts to run ingress e2e tests.
|
# run-higress-e2e-test starts to run ingress e2e tests.
|
||||||
.PHONY: run-ingress-e2e-test-wasmplugin
|
.PHONY: run-higress-e2e-test-wasmplugin
|
||||||
run-ingress-e2e-test-wasmplugin:
|
run-higress-e2e-test-wasmplugin:
|
||||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||||
go test -v -tags conformance ./test/ingress/e2e_test.go -isWasmPluginTest=true --ingress-class=higress --debug=true
|
go test -v -tags conformance ./test/e2e/e2e_test.go -isWasmPluginTest=true --ingress-class=higress --debug=true
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -20,10 +20,10 @@ import (
|
|||||||
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/cert"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/kubernetes"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,9 +17,9 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
package tests
|
package tests
|
||||||
|
|
||||||
import "github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
import "github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
|
|
||||||
var HigressConformanceTests []suite.ConformanceTest
|
var HigressConformanceTests []suite.ConformanceTest
|
||||||
@@ -17,8 +17,8 @@ package tests
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/http"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/http"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package cert
|
package cert
|
||||||
|
|
||||||
92
test/e2e/conformance/utils/config/timeout.go
Normal file
92
test/e2e/conformance/utils/config/timeout.go
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package config
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TimeoutConfig struct {
|
||||||
|
// CreateTimeout represents the maximum time for a Kubernetes object to be created.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
CreateTimeout time.Duration
|
||||||
|
|
||||||
|
// DeleteTimeout represents the maximum time for a Kubernetes object to be deleted.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
DeleteTimeout time.Duration
|
||||||
|
|
||||||
|
// GetTimeout represents the maximum time to get a Kubernetes object.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
GetTimeout time.Duration
|
||||||
|
|
||||||
|
// ManifestFetchTimeout represents the maximum time for getting content from a https:// URL.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
ManifestFetchTimeout time.Duration
|
||||||
|
|
||||||
|
// MaxTimeToConsistency is the maximum time for requiredConsecutiveSuccesses (default 3) requests to succeed in a row before failing the test.
|
||||||
|
// Max value for conformant implementation: 30 seconds
|
||||||
|
MaxTimeToConsistency time.Duration
|
||||||
|
|
||||||
|
// NamespacesMustBeReady represents the maximum time for all Pods and Gateways in a namespaces to be marked as ready.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
NamespacesMustBeReady time.Duration
|
||||||
|
|
||||||
|
// RequestTimeout represents the maximum time for making an HTTP Request with the roundtripper.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
RequestTimeout time.Duration
|
||||||
|
|
||||||
|
// TLSHandshakeTimeout represents the maximum time for waiting for a TLS handshake. Zero means no timeout.
|
||||||
|
// Max value for conformant implementation: None
|
||||||
|
TLSHandshakeTimeout time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// DefaultTimeoutConfig populates a TimeoutConfig with the default values.
|
||||||
|
func DefaultTimeoutConfig() TimeoutConfig {
|
||||||
|
return TimeoutConfig{
|
||||||
|
CreateTimeout: 60 * time.Second,
|
||||||
|
DeleteTimeout: 10 * time.Second,
|
||||||
|
GetTimeout: 10 * time.Second,
|
||||||
|
ManifestFetchTimeout: 10 * time.Second,
|
||||||
|
MaxTimeToConsistency: 30 * time.Second,
|
||||||
|
NamespacesMustBeReady: 300 * time.Second,
|
||||||
|
RequestTimeout: 10 * time.Second,
|
||||||
|
TLSHandshakeTimeout: 10 * time.Second,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetupTimeoutConfig(timeoutConfig *TimeoutConfig) {
|
||||||
|
defaultTimeoutConfig := DefaultTimeoutConfig()
|
||||||
|
if timeoutConfig.CreateTimeout == 0 {
|
||||||
|
timeoutConfig.CreateTimeout = defaultTimeoutConfig.CreateTimeout
|
||||||
|
}
|
||||||
|
if timeoutConfig.DeleteTimeout == 0 {
|
||||||
|
timeoutConfig.DeleteTimeout = defaultTimeoutConfig.DeleteTimeout
|
||||||
|
}
|
||||||
|
if timeoutConfig.GetTimeout == 0 {
|
||||||
|
timeoutConfig.GetTimeout = defaultTimeoutConfig.GetTimeout
|
||||||
|
}
|
||||||
|
if timeoutConfig.ManifestFetchTimeout == 0 {
|
||||||
|
timeoutConfig.ManifestFetchTimeout = defaultTimeoutConfig.ManifestFetchTimeout
|
||||||
|
}
|
||||||
|
if timeoutConfig.MaxTimeToConsistency == 0 {
|
||||||
|
timeoutConfig.MaxTimeToConsistency = defaultTimeoutConfig.MaxTimeToConsistency
|
||||||
|
}
|
||||||
|
if timeoutConfig.NamespacesMustBeReady == 0 {
|
||||||
|
timeoutConfig.NamespacesMustBeReady = defaultTimeoutConfig.NamespacesMustBeReady
|
||||||
|
}
|
||||||
|
if timeoutConfig.RequestTimeout == 0 {
|
||||||
|
timeoutConfig.RequestTimeout = defaultTimeoutConfig.RequestTimeout
|
||||||
|
}
|
||||||
|
if timeoutConfig.TLSHandshakeTimeout == 0 {
|
||||||
|
timeoutConfig.TLSHandshakeTimeout = defaultTimeoutConfig.TLSHandshakeTimeout
|
||||||
|
}
|
||||||
|
}
|
||||||
26
test/e2e/conformance/utils/flags/flags.go
Normal file
26
test/e2e/conformance/utils/flags/flags.go
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package flags
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
IngressClassName = flag.String("ingress-class", "higress", "Name of IngressClass to use for tests")
|
||||||
|
ShowDebug = flag.Bool("debug", false, "Whether to print debug logs")
|
||||||
|
CleanupBaseResources = flag.Bool("cleanup-base-resources", true, "Whether to cleanup base test resources after the run")
|
||||||
|
SupportedFeatures = flag.String("supported-features", "", "Supported features included in conformance tests suites")
|
||||||
|
ExemptFeatures = flag.String("exempt-features", "", "Exempt Features excluded from conformance tests suites")
|
||||||
|
)
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package http
|
package http
|
||||||
|
|
||||||
@@ -21,8 +20,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/config"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Assertion struct {
|
type Assertion struct {
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
ingress "github.com/alibaba/higress/test/ingress/conformance"
|
ingress "github.com/alibaba/higress/test/e2e/conformance"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
@@ -32,7 +31,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/yaml"
|
"k8s.io/apimachinery/pkg/util/yaml"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/config"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Applier prepares manifests depending on the available options and applies
|
// Applier prepares manifests depending on the available options and applies
|
||||||
18
test/e2e/conformance/utils/kubernetes/apply_test.go
Normal file
18
test/e2e/conformance/utils/kubernetes/apply_test.go
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package kubernetes
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "github.com/alibaba/higress/test/e2e/conformance/utils/flags"
|
||||||
|
)
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ import (
|
|||||||
// ensure auth plugins are loaded
|
// ensure auth plugins are loaded
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/cert"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/cert"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MustCreateSelfSignedCertSecret creates a self-signed SSL certificate and stores it in a secret
|
// MustCreateSelfSignedCertSecret creates a self-signed SSL certificate and stores it in a secret
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/config"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FilterStaleConditions returns the list of status condition whos observedGeneration does not
|
// FilterStaleConditions returns the list of status condition whos observedGeneration does not
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package roundtripper
|
package roundtripper
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/config"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RoundTripper is an interface used to make requests within conformance tests.
|
// RoundTripper is an interface used to make requests within conformance tests.
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
/*
|
||||||
//
|
Copyright 2022 The Kubernetes Authors.
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
//
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
Unless required by applicable law or agreed to in writing, software
|
||||||
//
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
See the License for the specific language governing permissions and
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
limitations under the License.
|
||||||
// See the License for the specific language governing permissions and
|
*/
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package suite
|
package suite
|
||||||
|
|
||||||
@@ -18,65 +17,24 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/config"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/config"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/kubernetes"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/kubernetes"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/roundtripper"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/roundtripper"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SupportedFeature allows opting in to additional conformance tests at an
|
|
||||||
// individual feature granularity.
|
|
||||||
type SupportedFeature string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// This option indicates support for TLSRoute (extended conformance).
|
|
||||||
SupportTLSRoute SupportedFeature = "TLSRoute"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute query param matching (extended conformance).
|
|
||||||
SupportHTTPRouteQueryParamMatching SupportedFeature = "HTTPRouteQueryParamMatching"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute method matching (extended conformance).
|
|
||||||
SupportHTTPRouteMethodMatching SupportedFeature = "HTTPRouteMethodMatching"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute response header modification (extended conformance).
|
|
||||||
SupportHTTPResponseHeaderModification SupportedFeature = "HTTPResponseHeaderModification"
|
|
||||||
|
|
||||||
// This option indicates support for Destination Port matching (extended conformance).
|
|
||||||
SupportRouteDestinationPortMatching SupportedFeature = "RouteDestinationPortMatching"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute port redirect (extended conformance).
|
|
||||||
SupportHTTPRoutePortRedirect SupportedFeature = "HTTPRoutePortRedirect"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute scheme redirect (extended conformance).
|
|
||||||
SupportHTTPRouteSchemeRedirect SupportedFeature = "HTTPRouteSchemeRedirect"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute path redirect (experimental conformance).
|
|
||||||
SupportHTTPRoutePathRedirect SupportedFeature = "HTTPRoutePathRedirect"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute host rewrite (experimental conformance)
|
|
||||||
SupportHTTPRouteHostRewrite SupportedFeature = "HTTPRouteHostRewrite"
|
|
||||||
|
|
||||||
// This option indicates support for HTTPRoute path rewrite (experimental conformance)
|
|
||||||
SupportHTTPRoutePathRewrite SupportedFeature = "HTTPRoutePathRewrite"
|
|
||||||
)
|
|
||||||
|
|
||||||
// StandardCoreFeatures are the features that are required to be conformant with
|
|
||||||
// the Core API features that are part of the Standard release channel.
|
|
||||||
var StandardCoreFeatures = map[SupportedFeature]bool{}
|
|
||||||
|
|
||||||
// ConformanceTestSuite defines the test suite used to run Gateway API
|
// ConformanceTestSuite defines the test suite used to run Gateway API
|
||||||
// conformance tests.
|
// conformance tests.
|
||||||
type ConformanceTestSuite struct {
|
type ConformanceTestSuite struct {
|
||||||
Client client.Client
|
Client client.Client
|
||||||
RoundTripper roundtripper.RoundTripper
|
RoundTripper roundtripper.RoundTripper
|
||||||
GatewayAddress string
|
GatewayAddress string
|
||||||
IngressClassName string
|
IngressClassName string
|
||||||
Debug bool
|
Debug bool
|
||||||
Cleanup bool
|
Cleanup bool
|
||||||
BaseManifests string
|
BaseManifests string
|
||||||
Applier kubernetes.Applier
|
Applier kubernetes.Applier
|
||||||
SupportedFeatures map[SupportedFeature]bool
|
TimeoutConfig config.TimeoutConfig
|
||||||
TimeoutConfig config.TimeoutConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Options can be used to initialize a ConformanceTestSuite.
|
// Options can be used to initialize a ConformanceTestSuite.
|
||||||
@@ -92,7 +50,6 @@ type Options struct {
|
|||||||
// CleanupBaseResources indicates whether or not the base test
|
// CleanupBaseResources indicates whether or not the base test
|
||||||
// resources such as Gateways should be cleaned up after the run.
|
// resources such as Gateways should be cleaned up after the run.
|
||||||
CleanupBaseResources bool
|
CleanupBaseResources bool
|
||||||
SupportedFeatures map[SupportedFeature]bool
|
|
||||||
TimeoutConfig config.TimeoutConfig
|
TimeoutConfig config.TimeoutConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,16 +62,6 @@ func New(s Options) *ConformanceTestSuite {
|
|||||||
roundTripper = &roundtripper.DefaultRoundTripper{Debug: s.Debug, TimeoutConfig: s.TimeoutConfig}
|
roundTripper = &roundtripper.DefaultRoundTripper{Debug: s.Debug, TimeoutConfig: s.TimeoutConfig}
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.SupportedFeatures == nil {
|
|
||||||
s.SupportedFeatures = StandardCoreFeatures
|
|
||||||
} else {
|
|
||||||
for feature, val := range StandardCoreFeatures {
|
|
||||||
if _, ok := s.SupportedFeatures[feature]; !ok {
|
|
||||||
s.SupportedFeatures[feature] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
suite := &ConformanceTestSuite{
|
suite := &ConformanceTestSuite{
|
||||||
Client: s.Client,
|
Client: s.Client,
|
||||||
RoundTripper: roundTripper,
|
RoundTripper: roundTripper,
|
||||||
@@ -126,8 +73,7 @@ func New(s Options) *ConformanceTestSuite {
|
|||||||
Applier: kubernetes.Applier{
|
Applier: kubernetes.Applier{
|
||||||
NamespaceLabels: s.NamespaceLabels,
|
NamespaceLabels: s.NamespaceLabels,
|
||||||
},
|
},
|
||||||
SupportedFeatures: s.SupportedFeatures,
|
TimeoutConfig: s.TimeoutConfig,
|
||||||
TimeoutConfig: s.TimeoutConfig,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply defaults
|
// apply defaults
|
||||||
@@ -189,7 +135,6 @@ func globalConformanceTestsListInfo(tests []ConformanceTest) string {
|
|||||||
type ConformanceTest struct {
|
type ConformanceTest struct {
|
||||||
ShortName string
|
ShortName string
|
||||||
Description string
|
Description string
|
||||||
Features []SupportedFeature
|
|
||||||
Manifests []string
|
Manifests []string
|
||||||
Slow bool
|
Slow bool
|
||||||
Parallel bool
|
Parallel bool
|
||||||
@@ -203,14 +148,6 @@ func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite) {
|
|||||||
t.Parallel()
|
t.Parallel()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that all features exercised by the test have been opted into by
|
|
||||||
// the suite.
|
|
||||||
for _, feature := range test.Features {
|
|
||||||
if supported, ok := suite.SupportedFeatures[feature]; !ok || !supported {
|
|
||||||
t.Skipf("Skipping %s: suite does not support %s", test.ShortName, feature)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, manifestLocation := range test.Manifests {
|
for _, manifestLocation := range test.Manifests {
|
||||||
t.Logf("Applying %s", manifestLocation)
|
t.Logf("Applying %s", manifestLocation)
|
||||||
suite.Applier.MustApplyWithCleanup(t, suite.Client, suite.TimeoutConfig, manifestLocation, true)
|
suite.Applier.MustApplyWithCleanup(t, suite.Client, suite.TimeoutConfig, manifestLocation, true)
|
||||||
@@ -23,9 +23,9 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/client/config"
|
"sigs.k8s.io/controller-runtime/pkg/client/config"
|
||||||
|
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/tests"
|
"github.com/alibaba/higress/test/e2e/conformance/tests"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/flags"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/flags"
|
||||||
"github.com/alibaba/higress/test/ingress/conformance/utils/suite"
|
"github.com/alibaba/higress/test/e2e/conformance/utils/suite"
|
||||||
)
|
)
|
||||||
|
|
||||||
var isWasmPluginTest = flag.Bool("isWasmPluginTest", false, "")
|
var isWasmPluginTest = flag.Bool("isWasmPluginTest", false, "")
|
||||||
@@ -46,7 +46,6 @@ func TestHigressConformanceTests(t *testing.T) {
|
|||||||
IngressClassName: *flags.IngressClassName,
|
IngressClassName: *flags.IngressClassName,
|
||||||
Debug: *flags.ShowDebug,
|
Debug: *flags.ShowDebug,
|
||||||
CleanupBaseResources: *flags.CleanupBaseResources,
|
CleanupBaseResources: *flags.CleanupBaseResources,
|
||||||
SupportedFeatures: map[suite.SupportedFeature]bool{},
|
|
||||||
GatewayAddress: "localhost",
|
GatewayAddress: "localhost",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 359 KiB |
@@ -1,141 +0,0 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package config
|
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
type TimeoutConfig struct {
|
|
||||||
// CreateTimeout represents the maximum time for a Kubernetes object to be created.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
CreateTimeout time.Duration
|
|
||||||
|
|
||||||
// DeleteTimeout represents the maximum time for a Kubernetes object to be deleted.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
DeleteTimeout time.Duration
|
|
||||||
|
|
||||||
// GetTimeout represents the maximum time to get a Kubernetes object.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
GetTimeout time.Duration
|
|
||||||
|
|
||||||
// GatewayMustHaveAddress represents the maximum time for at least one IP Address has been set in the status of a Gateway.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
GatewayMustHaveAddress time.Duration
|
|
||||||
|
|
||||||
// GatewayStatusMustHaveListeners represents the maximum time for a Gateway to have listeners in status that match the expected listeners.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
GatewayStatusMustHaveListeners time.Duration
|
|
||||||
|
|
||||||
// GWCMustBeAccepted represents the maximum time for a GatewayClass to have an Accepted condition set to true.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
GWCMustBeAccepted time.Duration
|
|
||||||
|
|
||||||
// HTTPRouteMustNotHaveParents represents the maximum time for an HTTPRoute to have either no parents or a single parent that is not accepted.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
HTTPRouteMustNotHaveParents time.Duration
|
|
||||||
|
|
||||||
// HTTPRouteMustHaveCondition represents the maximum time for an HTTPRoute to have the supplied Condition.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
HTTPRouteMustHaveCondition time.Duration
|
|
||||||
|
|
||||||
// HTTPRouteMustHaveParents represents the maximum time for an HTTPRoute to have parents in status that match the expected parents.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
HTTPRouteMustHaveParents time.Duration
|
|
||||||
|
|
||||||
// ManifestFetchTimeout represents the maximum time for getting content from a https:// URL.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
ManifestFetchTimeout time.Duration
|
|
||||||
|
|
||||||
// MaxTimeToConsistency is the maximum time for requiredConsecutiveSuccesses (default 3) requests to succeed in a row before failing the test.
|
|
||||||
// Max value for conformant implementation: 30 seconds
|
|
||||||
MaxTimeToConsistency time.Duration
|
|
||||||
|
|
||||||
// NamespacesMustBeReady represents the maximum time for all Pods and Gateways in a namespaces to be marked as ready.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
NamespacesMustBeReady time.Duration
|
|
||||||
|
|
||||||
// RequestTimeout represents the maximum time for making an HTTP Request with the roundtripper.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
RequestTimeout time.Duration
|
|
||||||
|
|
||||||
// TLSHandshakeTimeout represents the maximum time for waiting for a TLS handshake. Zero means no timeout.
|
|
||||||
// Max value for conformant implementation: None
|
|
||||||
TLSHandshakeTimeout time.Duration
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultTimeoutConfig populates a TimeoutConfig with the default values.
|
|
||||||
func DefaultTimeoutConfig() TimeoutConfig {
|
|
||||||
return TimeoutConfig{
|
|
||||||
CreateTimeout: 60 * time.Second,
|
|
||||||
DeleteTimeout: 10 * time.Second,
|
|
||||||
GetTimeout: 10 * time.Second,
|
|
||||||
GatewayMustHaveAddress: 180 * time.Second,
|
|
||||||
GatewayStatusMustHaveListeners: 60 * time.Second,
|
|
||||||
GWCMustBeAccepted: 180 * time.Second,
|
|
||||||
HTTPRouteMustNotHaveParents: 60 * time.Second,
|
|
||||||
HTTPRouteMustHaveCondition: 60 * time.Second,
|
|
||||||
HTTPRouteMustHaveParents: 60 * time.Second,
|
|
||||||
ManifestFetchTimeout: 10 * time.Second,
|
|
||||||
MaxTimeToConsistency: 30 * time.Second,
|
|
||||||
NamespacesMustBeReady: 300 * time.Second,
|
|
||||||
RequestTimeout: 10 * time.Second,
|
|
||||||
TLSHandshakeTimeout: 10 * time.Second,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetupTimeoutConfig(timeoutConfig *TimeoutConfig) {
|
|
||||||
defaultTimeoutConfig := DefaultTimeoutConfig()
|
|
||||||
if timeoutConfig.CreateTimeout == 0 {
|
|
||||||
timeoutConfig.CreateTimeout = defaultTimeoutConfig.CreateTimeout
|
|
||||||
}
|
|
||||||
if timeoutConfig.DeleteTimeout == 0 {
|
|
||||||
timeoutConfig.DeleteTimeout = defaultTimeoutConfig.DeleteTimeout
|
|
||||||
}
|
|
||||||
if timeoutConfig.GetTimeout == 0 {
|
|
||||||
timeoutConfig.GetTimeout = defaultTimeoutConfig.GetTimeout
|
|
||||||
}
|
|
||||||
if timeoutConfig.GatewayMustHaveAddress == 0 {
|
|
||||||
timeoutConfig.GatewayMustHaveAddress = defaultTimeoutConfig.GatewayMustHaveAddress
|
|
||||||
}
|
|
||||||
if timeoutConfig.GatewayStatusMustHaveListeners == 0 {
|
|
||||||
timeoutConfig.GatewayStatusMustHaveListeners = defaultTimeoutConfig.GatewayStatusMustHaveListeners
|
|
||||||
}
|
|
||||||
if timeoutConfig.GWCMustBeAccepted == 0 {
|
|
||||||
timeoutConfig.GWCMustBeAccepted = defaultTimeoutConfig.GWCMustBeAccepted
|
|
||||||
}
|
|
||||||
if timeoutConfig.HTTPRouteMustNotHaveParents == 0 {
|
|
||||||
timeoutConfig.HTTPRouteMustNotHaveParents = defaultTimeoutConfig.HTTPRouteMustNotHaveParents
|
|
||||||
}
|
|
||||||
if timeoutConfig.HTTPRouteMustHaveCondition == 0 {
|
|
||||||
timeoutConfig.HTTPRouteMustHaveCondition = defaultTimeoutConfig.HTTPRouteMustHaveCondition
|
|
||||||
}
|
|
||||||
if timeoutConfig.HTTPRouteMustHaveParents == 0 {
|
|
||||||
timeoutConfig.HTTPRouteMustHaveParents = defaultTimeoutConfig.HTTPRouteMustHaveParents
|
|
||||||
}
|
|
||||||
if timeoutConfig.ManifestFetchTimeout == 0 {
|
|
||||||
timeoutConfig.ManifestFetchTimeout = defaultTimeoutConfig.ManifestFetchTimeout
|
|
||||||
}
|
|
||||||
if timeoutConfig.MaxTimeToConsistency == 0 {
|
|
||||||
timeoutConfig.MaxTimeToConsistency = defaultTimeoutConfig.MaxTimeToConsistency
|
|
||||||
}
|
|
||||||
if timeoutConfig.NamespacesMustBeReady == 0 {
|
|
||||||
timeoutConfig.NamespacesMustBeReady = defaultTimeoutConfig.NamespacesMustBeReady
|
|
||||||
}
|
|
||||||
if timeoutConfig.RequestTimeout == 0 {
|
|
||||||
timeoutConfig.RequestTimeout = defaultTimeoutConfig.RequestTimeout
|
|
||||||
}
|
|
||||||
if timeoutConfig.TLSHandshakeTimeout == 0 {
|
|
||||||
timeoutConfig.TLSHandshakeTimeout = defaultTimeoutConfig.TLSHandshakeTimeout
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package flags
|
|
||||||
|
|
||||||
import (
|
|
||||||
"flag"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
IngressClassName = flag.String("ingress-class", "higress", "Name of IngressClass to use for tests")
|
|
||||||
ShowDebug = flag.Bool("debug", false, "Whether to print debug logs")
|
|
||||||
CleanupBaseResources = flag.Bool("cleanup-base-resources", true, "Whether to cleanup base test resources after the run")
|
|
||||||
SupportedFeatures = flag.String("supported-features", "", "Supported features included in conformance tests suites")
|
|
||||||
ExemptFeatures = flag.String("exempt-features", "", "Exempt Features excluded from conformance tests suites")
|
|
||||||
)
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package kubernetes
|
|
||||||
|
|
||||||
import (
|
|
||||||
_ "github.com/alibaba/higress/test/ingress/conformance/utils/flags"
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user