Skip to content

Commit

Permalink
Add WALLARM_API_HOST in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Dmitriev committed Dec 25, 2023
1 parent 0183cca commit 09860d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ jobs:
WALLARM_ENABLED: true
WALLARM_API_TOKEN: ${{ steps.secrets.outputs.api_token }}
WALLARM_API_HOST: audit.api.wallarm.com # TODO: tmp
WALLARM_API_PRESET: audit # TODO: tmp
CLIENT_ID: "55146" # TODO: tmp
run: |
kind get kubeconfig > $HOME/.kube/kind-config-kind
make E2E_NODES=6 kind-e2e-test
Expand Down
1 change: 1 addition & 0 deletions test/e2e/run-e2e-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ kubectl run --rm \
--env="NGINX_BASE_IMAGE=${NGINX_BASE_IMAGE}" \
--env="WALLARM_ENABLED=${WALLARM_ENABLED:-false}" \
--env="WALLARM_API_TOKEN=${WALLARM_API_TOKEN:-}" \
--env="WALLARM_API_HOST=${WALLARM_API_HOST:-}" \
--env="HTTPBUN_IMAGE=${HTTPBUN_IMAGE}" \
--overrides='{ "apiVersion": "v1", "spec":{"serviceAccountName": "ingress-nginx-e2e"}}' \
e2e --image=nginx-ingress-controller:e2e
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/run-kind-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export DOCKER_CLI_EXPERIMENTAL=enabled
export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}"
export WALLARM_ENABLED="${WALLARM_ENABLED:-false}"
export WALLARM_API_TOKEN="${WALLARM_API_TOKEN:-}"
export WALLARM_API_HOST="${WALLARM_API_HOST:-api.wallarm.com}"
SKIP_INGRESS_IMAGE_CREATION="${SKIP_INGRESS_IMAGE_CREATION:-false}"
SKIP_E2E_IMAGE_CREATION="${SKIP_E2E_IMAGE_CREATION:=false}"
SKIP_CLUSTER_CREATION="${SKIP_CLUSTER_CREATION:-false}"
Expand Down Expand Up @@ -129,6 +130,10 @@ if [ "${WALLARM_ENABLED}" == "true" ]; then
echo "WALLARM_API_TOKEN must be set! Exiting ..."
exit 1
fi
if [ -z "${WALLARM_API_HOST}" ]; then
echo "WALLARM_API_HOST must be set! Exiting ..."
exit 1
fi
fi

echo "[dev-env] running e2e tests..."
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/wait-for-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if [[ ! -z "$NAMESPACE_OVERLAY" && -d "$DIR/namespace-overlays/$NAMESPACE_OVERLA
--set controller.image.chroot="${IS_CHROOT}" \
--set controller.wallarm.enabled="${WALLARM_ENABLED}" \
--set controller.wallarm.token="${WALLARM_API_TOKEN}" \
--set controller.wallarm.apiHost="${WALLARM_API_HOST}" \
--set controller.wallarm.fallback="off"
else
cat << EOF | helm install nginx-ingress ${DIR}/charts/ingress-nginx --namespace=$NAMESPACE --values -
Expand All @@ -77,6 +78,7 @@ controller:
wallarm:
enabled: ${WALLARM_ENABLED}
token: ${WALLARM_API_TOKEN}
apiHost: ${WALLARM_API_HOST}
fallback: "off"
image:
repository: wallarm/ingress-controller
Expand Down

0 comments on commit 09860d9

Please sign in to comment.