Skip to content

Commit

Permalink
add e2e testing.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao committed Jun 12, 2024
1 parent 7bb3466 commit 2b1b928
Show file tree
Hide file tree
Showing 9 changed files with 1,260 additions and 20 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ ENABLE_JWT ?= true
ENABLE_AUTHZ ?= true
ENABLE_OCM_MOCK ?= false

# Enable gRPC server
ENABLE_GRPC ?= false

# Enable set images
POSTGRES_IMAGE ?= docker.io/library/postgres:14.2
MQTT_IMAGE ?= docker.io/library/eclipse-mosquitto:2.0.18
Expand Down Expand Up @@ -298,6 +301,7 @@ cmds:
--param="EXTERNAL_APPS_DOMAIN=${external_apps_domain}" \
--param="CONSUMER_NAME=$(consumer_name)" \
--param="ENABLE_OCM_MOCK=$(ENABLE_OCM_MOCK)" \
--param="ENABLE_GRPC=$(ENABLE_GRPC)" \
> "templates/$*-template.json"


Expand Down Expand Up @@ -409,5 +413,7 @@ e2e-test/teardown:
e2e-test: e2e-test/teardown e2e-test/setup
ginkgo --output-dir="${PWD}/test/e2e/report" --json-report=report.json --junit-report=report.xml \
${PWD}/test/e2e/pkg -- -consumer_name=$(shell cat ${PWD}/test/e2e/.consumer_name) \
-api-server=https://$(shell cat ${PWD}/test/e2e/.external_host_ip):30080 -kubeconfig=${PWD}/test/e2e/.kubeconfig
-api-server=https://$(shell cat ${PWD}/test/e2e/.external_host_ip):30080 \
-grpc-server=$(shell cat ${PWD}/test/e2e/.external_host_ip):30090 \
-kubeconfig=${PWD}/test/e2e/.kubeconfig
.PHONY: e2e-test
6 changes: 6 additions & 0 deletions templates/service-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ parameters:
description: HTTP server bind port
value: "8000"

- name: ENABLE_GRPC
displayName: Enable gRPC
description: Enable gRPC server
value: "false"

- name: GRPC_SERVER_BINDPORT
displayName: gRPC Server Bindport
description: gRPC server bind port
Expand Down Expand Up @@ -294,6 +299,7 @@ objects:
- --ocm-debug=${OCM_DEBUG}
- --https-cert-file=/secrets/tls/tls.crt
- --https-key-file=/secrets/tls/tls.key
- --enable-grpc-server=${ENABLE_GRPC}
- --grpc-tls-cert-file=/secrets/tls/tls.crt
- --grpc-tls-key-file=/secrets/tls/tls.key
- --acl-file=/configs/authentication/acl.yml
Expand Down
Loading

0 comments on commit 2b1b928

Please sign in to comment.