Skip to content

Commit

Permalink
tests(api): adding OTEL log tests [KAG-4828] (#9748)
Browse files Browse the repository at this point in the history
* tests(api): adding otel log tests

* remove package-lock file

* tests(api): address otel-log pr comments

* tests(api): change file split logic to newline
  • Loading branch information
Hayk-S authored Aug 7, 2024
1 parent caad36c commit 612a5e2
Show file tree
Hide file tree
Showing 11 changed files with 506 additions and 109 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/gateway-api-tests-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ jobs:
username: ${{ secrets.GHA_DOCKERHUB_PULL_USER }}
password: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PULL_TOKEN }}

- name: Add domain.test to hostnames for ACME Plugin tests
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts
- name: Set domain.test to hostnames for ACME and otel file permissions
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts && cd gateway-docker-compose-generator/otel && chmod 666 file_exporter.json

- name: Setup tmate session
if: ${{ inputs.enable_verbose_response_logging == 'true' }}
Expand Down Expand Up @@ -285,6 +285,7 @@ jobs:
# set CUSTOM_PLUGIN to false in case of amazonlinux-2 image
CUSTOM_PLUGIN: ${{ endsWith(env.GW_IMAGE, 'amazonlinux-2') && 'false' || env.CUSTOM_PLUGIN_VAR }}
ACME: true
OTEL: true

- name: Logs from Gateway Start
if: failure()
Expand Down Expand Up @@ -431,9 +432,9 @@ jobs:
with:
username: ${{ secrets.GHA_DOCKERHUB_PULL_USER }}
password: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PULL_TOKEN }}

- name: Add domain.test to hostnames for ACME Plugin tests
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts
- name: Set domain.test to hostnames for ACME and otel file permissions
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts && cd gateway-docker-compose-generator/otel && chmod 666 file_exporter.json

- name: Setup tmate session
if: ${{ inputs.enable_verbose_response_logging == 'true' }}
Expand Down Expand Up @@ -477,6 +478,7 @@ jobs:
# set CUSTOM_PLUGIN to false in case of amazonlinux-2 image
CUSTOM_PLUGIN: ${{ endsWith(env.GW_IMAGE, 'amazonlinux-2') && 'false' || env.CUSTOM_PLUGIN_VAR }}
ACME: true
OTEL: true

- name: Logs from Gateway Start
if: failure()
Expand Down Expand Up @@ -606,9 +608,9 @@ jobs:
with:
username: ${{ secrets.GHA_DOCKERHUB_PULL_USER }}
password: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PULL_TOKEN }}

- name: Add domain.test to hostnames for ACME Plugin tests
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts
- name: Set domain.test to hostnames for ACME and otel file permissions
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts && cd gateway-docker-compose-generator/otel && chmod 666 file_exporter.json

- name: Setup tmate session
if: ${{ inputs.enable_verbose_response_logging == 'true' }}
Expand Down Expand Up @@ -664,6 +666,7 @@ jobs:
AZURE_CLIENT_SECRET: ${{ secrets.TEST_API_AZURE_CLIENT_SECRET }}
ACME: true
CUSTOM_PLUGIN: ${{ env.CUSTOM_PLUGIN_VAR }}
OTEL: true

- name: Logs from Gateway Start
if: failure()
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/gateway-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
username: ${{ secrets.GHA_DOCKERHUB_PULL_USER }}
password: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PULL_TOKEN }}

- name: Add domain.test to hostnames for ACME Plugin tests
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts
- name: Set domain.test to hostnames for ACME and otel file permissions
run: echo "127.0.0.1 domain.test" | sudo tee -a /etc/hosts && cd gateway-docker-compose-generator/otel && chmod 666 file_exporter.json

- name: Check for FIPS image
run: |
Expand Down Expand Up @@ -151,6 +151,7 @@ jobs:
# set CUSTOM_PLUGIN to false in case of amazonlinux-2 image
CUSTOM_PLUGIN: ${{ endsWith(env.GW_IMAGE, 'amazonlinux-2') && 'false' || env.CUSTOM_PLUGIN_VAR }}
ACME: true
OTEL: true

- name: Logs from Gateway Start
if: failure()
Expand Down
3 changes: 2 additions & 1 deletion spec-ee/kong-api-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ Make sure to enable these services using [gateway-docker-compose-generator](http
- All tests relying in upstream service or sending requests to upstream use [httpbin-service](https://github.com/Kong/gateway-docker-compose-generator/blob/ce44aa5d508b7210336a58975285ea8e2e6b6bee/docker-compose.yml.sh#L211) which needs to run in the same docker network as kong.
- `1_vitals-influxdb` test requires [INFLUXDB](https://github.com/Kong/gateway-docker-compose-generator/blob/d9ee692675d4efdb14d0e1b8376b20a290f72b34/docker-compose.yml.sh#L32)
- `aws-lambda-secret-reference` and `rla-secret-reference` tests require [HCV](https://github.com/Kong/gateway-docker-compose-generator/blob/d9ee692675d4efdb14d0e1b8376b20a290f72b34/docker-compose.yml.sh#L40)
- `opentelemtry` test requires [JAEGER](https://github.com/Kong/gateway-docker-compose-generator/blob/d9ee692675d4efdb14d0e1b8376b20a290f72b34/docker-compose.yml.sh#L54)
- `opentelemetry` test requires [JAEGER](https://github.com/Kong/gateway-docker-compose-generator/blob/d9ee692675d4efdb14d0e1b8376b20a290f72b34/docker-compose.yml.sh#L54)
- `otel-logs` test requires [opentelemetry-collector](https://github.com/Kong/gateway-docker-compose-generator/blob/main/docker-compose.yml.sh#L108)
- `rate-limiting-advanced` test requires [REDIS (standalone)](https://github.com/Kong/gateway-docker-compose-generator/blob/d9ee692675d4efdb14d0e1b8376b20a290f72b34/docker-compose.yml.sh#L29)
- `oas-validation` test requires [SWAGGER](https://github.com/Kong/gateway-docker-compose-generator/blob/main/docker-compose.yml.sh#L36)
- `acme` test requires [Pebble](https://github.com/Kong/gateway-docker-compose-generator/blob/main/docker-compose.yml.sh#L1022) which will be automatically enabled when [ACME](https://github.com/Kong/gateway-docker-compose-generator/blob/main/docker-compose.yml.sh#L126) is set to `true`
Expand Down
Loading

0 comments on commit 612a5e2

Please sign in to comment.