Skip to content

Commit

Permalink
Tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Huang Xin <xin1.huang@intel.com>
  • Loading branch information
gyohuangxin committed Feb 20, 2024
1 parent f92ecd1 commit beb81d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Download Nighthawk Docker images
run: |
docker pull envoyproxy/nighthawk-dev:latest
docker pull envoyproxy/nighthawk-dev:latest
- name: Run Benchmark tests
env:
Expand Down
15 changes: 8 additions & 7 deletions tools/make/kube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ conformance: create-cluster kube-install-image kube-deploy run-conformance delet
experimental-conformance: create-cluster kube-install-image kube-deploy run-experimental-conformance delete-cluster ## Create a kind cluster, deploy EG into it, run Gateway API conformance, and clean up.

.PHONY: benchmark
benchmark: create-cluster kube-install-image kube-deploy build-benchmark run-benchmark
benchmark: create-cluster kube-install-image kube-deploy run-benchmark

.PHONY: e2e
e2e: create-cluster kube-install-image kube-deploy install-ratelimit run-e2e delete-cluster
Expand Down Expand Up @@ -185,19 +185,20 @@ run-experimental-conformance: ## Run Experimental Gateway API conformance.
kubectl apply -f test/config/gatewayclass.yaml
go test -v -tags experimental ./test/conformance -run TestExperimentalConformance --gateway-class=envoy-gateway --debug=true --organization=envoyproxy --project=envoy-gateway --url=https://github.com/envoyproxy/gateway --version=latest --report-output="$(CONFORMANCE_REPORT_PATH)" --contact=https://github.com/envoyproxy/gateway/blob/main/GOVERNANCE.md

.PHONY: build-benchmark
build-benchmark: ## Build Benchmark Framework
@$(LOG_TARGET)
git clone -b 0.5.0 https://github.com/envoyproxy/nighthawk.git && cd nighthawk
ci/do_ci.sh build

.PHONY: run-benchmark
run-benchmark: ## Run benchmark tests
@$(LOG_TARGET)
kubectl wait --timeout=$(WAIT_TIMEOUT) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
kubectl apply -f test/config/gatewayclass.yaml
# kubectl create configmap test-server-config --from-file=test/benchmark/test-server.yaml --output yaml
@$(call log, "Deploying benchmark test server")
kubectl apply -f https://github.com/envoyproxy/gateway/releases/download/v0.6.0/quickstart.yaml -n default
export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
kubectl -n envoy-gateway-system port-forward service/${ENVOY_SERVICE} 8888:80 &
curl --verbose --header "Host: www.example.com" http://localhost:8888/get
@$(call log, "Running benchmark tests")
docker run envoyproxy/nighthawk-dev:latest nighthawk_client http://localhost:8888


.PHONY: delete-cluster
delete-cluster: $(tools/kind) ## Delete kind cluster.
Expand Down

0 comments on commit beb81d4

Please sign in to comment.