Signed-off-by: co63oc <co63oc@users.noreply.github.com>
This commit is contained in:
co63oc
2025-07-25 16:18:39 +08:00
committed by GitHub
parent 7348c265b5
commit f826d79109
7 changed files with 25 additions and 25 deletions

View File

@@ -36,7 +36,7 @@ Higress 提供了运行 Ingress API 一致性测试和 wasmplugin 测试的 make
4. kube-load-image: 将 dev higress-controller 镜像加载到 kind 集群中。
5. install-dev: 使用 helm 安装带有 dev 镜像的 higress-controller并安装最新的 higress-gateway、istiod。
6. run-e2e-test:
1. 所有测试都在 `test/e2e/conformance/tests` 中定义,并在初始化阶段被注册到`ConformanceTests`中。`ConormanceTests` 是一个全局变量,用于存储所有的一致性测试用例。
1. 所有测试都在 `test/e2e/conformance/tests` 中定义,并在初始化阶段被注册到`ConformanceTests`中。`ConformanceTests` 是一个全局变量,用于存储所有的一致性测试用例。
2. 准备资源并将它们安装到集群中,例如后端服务/部署。
3. 加载选择打开的一致性测试,并逐个运行它们,如果不符合预期,则失败。
@@ -44,7 +44,7 @@ Higress 提供了运行 Ingress API 一致性测试和 wasmplugin 测试的 make
要添加新的测试用例,首先需要在 `test/ingress/conformance/tests` 中添加 `xxx.go``xxx.yaml``xxx.yaml` 是您需要在集群中应用的 Ingress 资源,`xxx.go` 定义了 HigressConformanceTest。
然后,您应该将您定义的测试用例注册到`ConormanceTests`方法是在xxx.go中使用`init()` 函数调用`Register(YOUR_PLUGIN_SHORT_NAME)`
然后,您应该将您定义的测试用例注册到`ConformanceTests`方法是在xxx.go中使用`init()` 函数调用`Register(YOUR_PLUGIN_SHORT_NAME)`
通过查看 `test/ingress/conformance/tests/httproute-simple-same-namespace.go``test/ingress/conformance/tests/httproute-simple-same-namespace.yaml` 中的代码,您可以快速了解并尝试编写一个测试用例。

View File

@@ -24,10 +24,10 @@
apiVersion: v1
kind: Pod
metadata:
name: consul-standlone
name: consul-standalone
namespace: higress-conformance-app-backend
labels:
name: consul-standlone
name: consul-standalone
spec:
containers:
- name: consul
@@ -46,7 +46,7 @@ metadata:
name: consul-service
namespace: higress-conformance-app-backend
labels:
name: consul-standlone
name: consul-standalone
spec:
clusterIP: None
ports:
@@ -55,7 +55,7 @@ spec:
protocol: TCP
targetPort: 8500
selector:
name: consul-standlone
name: consul-standalone
---
apiVersion: v1
kind: Pod