diff --git a/.github/reusable-steps/publish-test-report/action.yaml b/.github/reusable-steps/publish-test-report/action.yaml index 29f898415c..f27458959a 100644 --- a/.github/reusable-steps/publish-test-report/action.yaml +++ b/.github/reusable-steps/publish-test-report/action.yaml @@ -1,10 +1,9 @@ name: Run Publish Tests Report description: Publishes tests report to github runs: - using: composite + using: "composite" steps: - name: Publish Test Report - shell: bash uses: ctrf-io/github-test-reporter@024bc4b64d997ca9da86833c6b9548c55c620e40 # v1 with: report-path: './tools/automated-tests/testReport.json' diff --git a/.github/workflows/event-gateway-tests.yaml b/.github/workflows/event-gateway-tests.yaml index c0ea56ddff..d2602fab08 100644 --- a/.github/workflows/event-gateway-tests.yaml +++ b/.github/workflows/event-gateway-tests.yaml @@ -39,6 +39,12 @@ jobs: - name: Generate instruction files uses: './.github/reusable-steps/generate-instruction-files' + - name: Download Kong License + uses: Kong/kong-license@master + id: getLicense + with: + op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + - name: Run tests working-directory: tools/automated-tests shell: bash diff --git a/app/_how-tos/encrypt-kafka-messages-with-event-gateway.md b/app/_how-tos/encrypt-kafka-messages-with-event-gateway.md index 6bfd65a68c..07ce73f742 100644 --- a/app/_how-tos/encrypt-kafka-messages-with-event-gateway.md +++ b/app/_how-tos/encrypt-kafka-messages-with-event-gateway.md @@ -188,13 +188,11 @@ In production, we recommend using [SNI routing](/event-gateway/architecture/#hos Use OpenSSL to generate the key that will be used to encrypt and decrypt messages: -{% validation custom-command %} -command: | - export MY_KEY=$(openssl rand -base64 32) -expected: - return_code: 0 -render_output: false -{% endvalidation %} + +{% env_variables %} +MY_KEY: $(openssl rand -base64 32) +{% endenv_variables %} + ## Add a static key @@ -292,6 +290,7 @@ Now let's verify that the message was encrypted, by consuming the message direct command: | kafkactl -C kafkactl.yaml --context direct consume my-test-topic --exit --output json --from-beginning --print-headers expected: + message: '"kong/enc": "\u0000\u0001\u0000-static://' return_code: 0 render_output: false {% endvalidation %} diff --git a/app/_includes/how-tos/validations/env-variables/index.html b/app/_includes/how-tos/validations/env-variables/index.html index 6d7fc2372e..1ffd565fcf 100644 --- a/app/_includes/how-tos/validations/env-variables/index.html +++ b/app/_includes/how-tos/validations/env-variables/index.html @@ -1,6 +1,10 @@ +{% if page.works_on contains 'on-prem' %}
-{% include how-tos/validations/env-variables/snippet.md variables=config.variables %} + {% include how-tos/validations/env-variables/snippet.md variables=config.variables %}
+{% endif %} +{% if page.works_on contains 'konnect' %}
{% include how-tos/validations/env-variables/snippet.md variables=config.variables %} -
\ No newline at end of file + +{% endif %} \ No newline at end of file diff --git a/tools/automated-tests/docker-helper.js b/tools/automated-tests/docker-helper.js index bc7cc4d354..42c2c047a6 100644 --- a/tools/automated-tests/docker-helper.js +++ b/tools/automated-tests/docker-helper.js @@ -195,11 +195,3 @@ export async function getLiveEnv(container) { } return env; } - -export async function addEnvVariablesFromContainer(container, runtimeConfig) { - const envVars = await getLiveEnv(container); - - for (var [name, value] of Object.entries(envVars)) { - runtimeConfig.env[name] = value; - } -} diff --git a/tools/automated-tests/docker/Dockerfile b/tools/automated-tests/docker/Dockerfile index c11a7684ca..d78ad9455f 100644 --- a/tools/automated-tests/docker/Dockerfile +++ b/tools/automated-tests/docker/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:latest RUN apt-get update -y && apt-get install -y apt-utils curl docker.io uuid-runtime ca-certificates curl -RUN curl -L -o deck_v1.deb https://github.com/Kong/deck/releases/download/v1.49.1/deck_v1.49.1_arm64.deb && \ +RUN curl -L -o deck_v1.deb https://github.com/Kong/deck/releases/download/v1.49.1/deck_v1.49.1_amd64.deb && \ dpkg -i deck_v1.deb RUN apt-get update RUN apt-get install ca-certificates curl diff --git a/tools/automated-tests/instructions/validations.js b/tools/automated-tests/instructions/validations.js index 4e85533ed9..208988e557 100644 --- a/tools/automated-tests/instructions/validations.js +++ b/tools/automated-tests/instructions/validations.js @@ -4,10 +4,8 @@ import https from "https"; import tough from "tough-cookie"; import fetchCookie from "fetch-cookie"; -import { runtimeEnvironment } from "../runtimes.js"; import { setEnvVariable, - addEnvVariablesFromContainer, executeCommand, getLiveEnv, } from "../docker-helper.js"; @@ -251,7 +249,7 @@ async function envVariables(config, runtimeConfig, container) { } await setEnvVariable(container, key, value); } - await addEnvVariablesFromContainer(container, runtimeConfig); + return []; }