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 503208c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: go version
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.1'
- run: go version
#- run: go version

Check warning on line 15 in .github/workflows/benchmark.yaml

View workflow job for this annotation

GitHub Actions / lint

15:8 [comments] missing starting space in comment
#- uses: actions/setup-go@v5

Check warning on line 16 in .github/workflows/benchmark.yaml

View workflow job for this annotation

GitHub Actions / lint

16:8 [comments] missing starting space in comment
# with:
# go-version: '>=1.21.1'
#- run: go version

Check warning on line 19 in .github/workflows/benchmark.yaml

View workflow job for this annotation

GitHub Actions / lint

19:8 [comments] missing starting space in comment

- 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 503208c

Please sign in to comment.