This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch feature/high-priority-e2e-tests in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
commit 94d75ed7fc1051fe2da4ca4f46d017fd14b17df8 Author: Wu Sheng <[email protected]> AuthorDate: Wed Mar 18 20:45:10 2026 +0800 Add 8 high-priority e2e test cases for 0.3.0 Add auth, SSL, mTLS, OTLP traces, virtual MQ, Kafka exporter, self-observability, and MQE e2e tests to validate native image feature coverage against upstream SkyWalking. --- .github/workflows/ci.yml | 32 ++++- changes/changes.md | 13 ++ test/e2e/cases/auth/docker-compose.yml | 130 ++++++++++++++++++ test/e2e/cases/auth/e2e.yaml | 48 +++++++ test/e2e/cases/exporter/docker-compose.yml | 171 ++++++++++++++++++++++++ test/e2e/cases/exporter/e2e.yaml | 48 +++++++ test/e2e/cases/mqe/docker-compose.yml | 147 ++++++++++++++++++++ test/e2e/cases/mqe/e2e.yaml | 51 +++++++ test/e2e/cases/mqe/mqe-cases.yaml | 120 +++++++++++++++++ test/e2e/cases/mtls/docker-compose.yml | 143 ++++++++++++++++++++ test/e2e/cases/mtls/e2e.yaml | 48 +++++++ test/e2e/cases/otlp-traces/docker-compose.yml | 105 +++++++++++++++ test/e2e/cases/otlp-traces/e2e.yaml | 58 ++++++++ test/e2e/cases/so11y/docker-compose.yml | 142 ++++++++++++++++++++ test/e2e/cases/so11y/e2e.yaml | 49 +++++++ test/e2e/cases/so11y/otel-collector-config.yaml | 47 +++++++ test/e2e/cases/so11y/so11y-cases.yaml | 39 ++++++ test/e2e/cases/ssl/docker-compose.yml | 135 +++++++++++++++++++ test/e2e/cases/ssl/e2e.yaml | 48 +++++++ test/e2e/cases/virtual-mq/docker-compose.yml | 156 +++++++++++++++++++++ test/e2e/cases/virtual-mq/e2e.yaml | 45 +++++++ 21 files changed, 1771 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 332c0f7..431f241 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -329,6 +329,22 @@ jobs: case: traceql - name: Baseline case: baseline + - name: Auth + case: auth + - name: SSL + case: ssl + - name: mTLS + case: mtls + - name: OTLP Traces + case: otlp-traces + - name: Virtual MQ + case: virtual-mq + - name: Kafka Exporter + case: exporter + - name: Self Observability + case: so11y + - name: MQE + case: mqe steps: - name: Checkout with submodules uses: actions/checkout@v5 @@ -344,15 +360,15 @@ jobs: - name: Load Docker image run: docker load -i /tmp/skywalking-oap-native.tar - - name: Set up JDK 17 (baseline mock-sender) - if: matrix.test.case == 'baseline' + - name: Set up JDK 17 (test service build) + if: matrix.test.case == 'baseline' || matrix.test.case == 'mqe' uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Restore Maven cache (baseline mock-sender) - if: matrix.test.case == 'baseline' + - name: Restore Maven cache (test service build) + if: matrix.test.case == 'baseline' || matrix.test.case == 'mqe' uses: actions/cache/restore@v5 with: path: ~/.m2/repository @@ -367,6 +383,14 @@ jobs: -pl e2e-mock-sender -am \ package -DskipTests -Dmaven.javadoc.skip + - name: Build mock baseline server jar (mqe only) + if: matrix.test.case == 'mqe' + run: | + cd skywalking && ./mvnw -B -q \ + -f test/e2e-v2/java-test-service/pom.xml \ + -pl e2e-mock-baseline-server -am \ + package -DskipTests -Dmaven.javadoc.skip + - name: Run E2E test uses: apache/skywalking-infra-e2e@8c21e43e241a32a54bdf8eeceb9099eb27e5e9b4 with: diff --git a/changes/changes.md b/changes/changes.md index f0aad35..029c90e 100644 --- a/changes/changes.md +++ b/changes/changes.md @@ -1,5 +1,18 @@ # Changes +## 0.3.0 + +### E2E Tests + +- Add Auth e2e test case (token-based agent-to-OAP authentication). +- Add SSL e2e test case (TLS-encrypted gRPC communication). +- Add mTLS e2e test case (mutual TLS with client certificates). +- Add OTLP Traces e2e test case (OpenTelemetry trace ingestion via Zipkin API). +- Add Virtual MQ e2e test case (Kafka-instrumented virtual MQ layer metrics). +- Add Kafka Exporter e2e test case (trace and log export to Kafka). +- Add Self-Observability e2e test case (OAP Prometheus telemetry via OTEL collector). +- Add MQE e2e test case (Metrics Query Engine expression evaluation with baseline). + ## 0.2.1 ### Build diff --git a/test/e2e/cases/auth/docker-compose.yml b/test/e2e/cases/auth/docker-compose.yml new file mode 100644 index 0000000..a61bfc0 --- /dev/null +++ b/test/e2e/cases/auth/docker-compose.yml @@ -0,0 +1,130 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_AUTHENTICATION: test-token + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_AGENT_AUTHENTICATION: test-token + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_AGENT_AUTHENTICATION: test-token + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/auth/e2e.yaml b/test/e2e/cases/auth/e2e.yaml new file mode 100644 index 0000000..521c8a7 --- /dev/null +++ b/test/e2e/cases/auth/e2e.yaml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auth E2E — native OAP with BanyanDB and token authentication +# Validates that agent-to-OAP authentication works with native image. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/simple/simple-cases.yaml diff --git a/test/e2e/cases/exporter/docker-compose.yml b/test/e2e/cases/exporter/docker-compose.yml new file mode 100644 index 0000000..97e2c67 --- /dev/null +++ b/test/e2e/cases/exporter/docker-compose.yml @@ -0,0 +1,171 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + zookeeper: + image: zookeeper:3.4 + hostname: zookeeper + expose: + - 2181 + networks: + - e2e + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 2181"] + interval: 5s + timeout: 60s + retries: 120 + + broker-a: + image: bitnamilegacy/kafka:2.4.1 + hostname: broker-a + expose: + - 9092 + networks: + - e2e + environment: + - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 + - KAFKA_BROKER_ID=10 + - ALLOW_PLAINTEXT_LISTENER=yes + depends_on: + zookeeper: + condition: service_healthy + healthcheck: + test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"] + interval: 5s + timeout: 60s + retries: 120 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + - 1234 + networks: + - e2e + ports: + - 1234 + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_EXPORTER: default + SW_EXPORTER_ENABLE_KAFKA_TRACE: "true" + SW_EXPORTER_ENABLE_KAFKA_LOG: "true" + SW_EXPORTER_KAFKA_SERVERS: broker-a:9092 + SW_TELEMETRY: prometheus + depends_on: + banyandb: + condition: service_healthy + broker-a: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/exporter/e2e.yaml b/test/e2e/cases/exporter/e2e.yaml new file mode 100644 index 0000000..c380bcf --- /dev/null +++ b/test/e2e/cases/exporter/e2e.yaml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Kafka Exporter E2E — native OAP with BanyanDB +# Validates trace and log export to Kafka via the ExporterModule. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/exporter/kafka/exporter-cases.yaml diff --git a/test/e2e/cases/mqe/docker-compose.yml b/test/e2e/cases/mqe/docker-compose.yml new file mode 100644 index 0000000..136f6c7 --- /dev/null +++ b/test/e2e/cases/mqe/docker-compose.yml @@ -0,0 +1,147 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# No custom OAL mount — native image uses pre-compiled OAL with all standard metrics. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_API_PIPELINE_BASELINE_SERVICE_HOST: baseline-server + depends_on: + banyandb: + condition: service_healthy + baseline-server: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + baseline-server: + image: "eclipse-temurin:11-jre" + volumes: + - ../../../../skywalking/test/e2e-v2/java-test-service/e2e-mock-baseline-server/target/e2e-mock-baseline-server-2.0.0.jar:/e2e-mock-baseline-server-2.0.0.jar + command: ["java", "-jar", "/e2e-mock-baseline-server-2.0.0.jar"] + networks: + - e2e + ports: + - 18080 + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/18080"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/mqe/e2e.yaml b/test/e2e/cases/mqe/e2e.yaml new file mode 100644 index 0000000..ea2e48c --- /dev/null +++ b/test/e2e/cases/mqe/e2e.yaml @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# MQE (Metrics Query Engine) E2E — native OAP with BanyanDB +# Validates MQE expression parsing and evaluation. +# Adapted for native image: no custom OAL override (uses pre-compiled OAL), +# no disable.oal test (can't disable metrics at runtime in native image), +# no service_percentile_old (not in standard OAL). + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - mqe-cases.yaml diff --git a/test/e2e/cases/mqe/mqe-cases.yaml b/test/e2e/cases/mqe/mqe-cases.yaml new file mode 100644 index 0000000..6603078 --- /dev/null +++ b/test/e2e/cases/mqe/mqe-cases.yaml @@ -0,0 +1,120 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# MQE test cases for native image. +# Adapted from upstream mqe-cases.yaml: +# - Removed service_percentile_old (not in standard pre-compiled OAL) +# - Removed disable-metrics test (can't disable OAL metrics at runtime in native image) + +cases: + # service metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=service_sla --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/no-OP.yml + + # binary-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="service_sla * 2 /100 + 500 - 50" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/binary-OP.yml + + # compare-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="(service_cpm + 1) > 2" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/compare-OP.yml + + # bool-OP (SINGLE_VALUE) + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="avg(service_cpm + 1) > 2 && avg(service_sla/100) > 95" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/bool-OP.yml + # bool-OP (TIME_SERIES_VALUES) + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="(service_cpm + 1) > 2 && (service_sla/100) > 95" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/compare-OP.yml + + # aggregation-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="avg(service_sla/100)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/aggregation-OP.yml + + # func-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="abs(service_sla-10300)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/func-OP.yml + + # topN-OP-service Global + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="top_n(service_resp_time,3,des)" + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/topN-OP-service.yml + # topN-OP-service Global with attrs + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="top_n(service_resp_time,3,des,attr0='GENERAL')/100" + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/topN-OP-service.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="top_n(service_resp_time,3,des,attr0!='Not_GENERAL')/100" + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/topN-OP-service.yml + + # topN-OP-instance + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="top_n(service_instance_resp_time,3,des)/100" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/topN-OP-instance.yml + + # topN-Of-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="top_n_of(top_n(service_resp_time,3,des,attr0='GENERAL'), top_n(service_cpm,3,des,attr0='GENERAL'), 2, des)" + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/topN-OP-service.yml + + # select labels and relabels + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="relabels(relabels(service_percentile{p='50,75,90'},p='50,75',p='P50,P75'),p='90',p='P90')" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/relabels-OP.yml + + # relabels and calculate + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="relabels(service_percentile{p='50,75,90'},p='50',p='P50')/relabels(service_percentile{p='50,75,90'},p='50',p='P50')" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/relabels-binary-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="relabels(service_percentile{p='50,75,90'}/service_percentile{p='50,75,90'},p='50',p='P50')" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/relabels-binary-OP.yml + + # aggregateLabels-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="aggregate_labels(service_percentile,avg)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/aggregateLabels-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="aggregate_labels(service_percentile,sum)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/aggregateLabels-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="aggregate_labels(service_percentile,max)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/aggregateLabels-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="aggregate_labels(service_percentile,min)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/aggregateLabels-OP.yml + + # viewAsSeq-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="view_as_seq(mq_service_consume_sla,service_sla)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/viewAsSeq-OP.yml + + # isPresent-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="is_present(service_sla)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/isPresent-OP-true.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="is_present(not_exist_meter,mq_service_consume_cpm)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/isPresent-OP-false.yml + + # trend-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="increase(service_resp_time,1)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/trend-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="rate(service_resp_time,1)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/trend-OP.yml + + # sort-value-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="sort_values(service_percentile,2,asc,avg)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/sort-value-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="sort_values(service_percentile,1,des,avg)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/sort-value-OP.yml + + # sort-label-value-OP + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="sort_label_values(service_percentile{p='50,75,90'},des,p)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/sort-label-value-OP.yml + + # baseline + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_cpm,upper)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/baseline-upper-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_cpm,lower)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/baseline-lower-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_cpm,value)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/baseline-OP.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_percentile{p='95,99'},upper)" --service-name=e2e-service-provider + expected: ../../../../skywalking/test/e2e-v2/cases/mqe/expected/baseline-label-OP.yml diff --git a/test/e2e/cases/mtls/docker-compose.yml b/test/e2e/cases/mtls/docker-compose.yml new file mode 100644 index 0000000..b499875 --- /dev/null +++ b/test/e2e/cases/mtls/docker-compose.yml @@ -0,0 +1,143 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 11811 + - 12800 + networks: + - e2e + ports: + - 12800 + volumes: + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/server:/skywalking/certs + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_RECEIVER_GRPC_PORT: 11811 + SW_RECEIVER_GRPC_SSL_ENABLED: "true" + SW_RECEIVER_GRPC_SSL_KEY_PATH: /skywalking/certs/server.pem + SW_RECEIVER_GRPC_SSL_CERT_CHAIN_PATH: /skywalking/certs/server.crt + SW_RECEIVER_GRPC_SSL_TRUSTED_CAS_PATH: /skywalking/certs/ca.crt + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/client:/skywalking/agent/certs + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_AGENT_SSL_KEY_PATH: /certs/client.pem + SW_AGENT_SSL_CERT_CHAIN_PATH: /certs/client.crt + SW_AGENT_SSL_TRUSTED_CA_PATH: /certs/ca.crt + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/client:/skywalking/agent/certs + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_AGENT_SSL_KEY_PATH: /certs/client.pem + SW_AGENT_SSL_CERT_CHAIN_PATH: /certs/client.crt + SW_AGENT_SSL_TRUSTED_CA_PATH: /certs/ca.crt + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/mtls/e2e.yaml b/test/e2e/cases/mtls/e2e.yaml new file mode 100644 index 0000000..c2f8f6e --- /dev/null +++ b/test/e2e/cases/mtls/e2e.yaml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# mTLS E2E — native OAP with BanyanDB and mutual TLS +# Validates that mutual TLS communication works with native image. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/simple/simple-cases.yaml diff --git a/test/e2e/cases/otlp-traces/docker-compose.yml b/test/e2e/cases/otlp-traces/docker-compose.yml new file mode 100644 index 0000000..b08ae14 --- /dev/null +++ b/test/e2e/cases/otlp-traces/docker-compose.yml @@ -0,0 +1,105 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: '3.9' +x-default-logging: &logging + driver: "json-file" + options: + max-size: "5m" + max-file: "2" + +services: + frontend: + image: ghcr.io/open-telemetry/demo:1.4.0-frontend + deploy: + resources: + limits: + memory: 200M + restart: unless-stopped + ports: + - 8080 + environment: + PORT: 8080 + FRONTEND_ADDR: frontend:8080 + PRODUCT_CATALOG_SERVICE_ADDR: productcatalogservice:3550 + OTEL_EXPORTER_OTLP_ENDPOINT: http://oap:11800 + OTEL_RESOURCE_ATTRIBUTES: service.namespace=opentelemetry-demo + ENV_PLATFORM: local + OTEL_SERVICE_NAME: frontend + WEB_OTEL_SERVICE_NAME: frontend-web + CURRENCY_SERVICE_ADDR: no.exist:80 + depends_on: + - oap + - productcatalogservice + logging: *logging + networks: + - e2e + + productcatalogservice: + image: ghcr.io/open-telemetry/demo:1.4.0-productcatalogservice + deploy: + resources: + limits: + memory: 20M + restart: unless-stopped + ports: + - "3550" + environment: + PRODUCT_CATALOG_SERVICE_PORT: 3550 + OTEL_EXPORTER_OTLP_ENDPOINT: http://oap:11800 + OTEL_RESOURCE_ATTRIBUTES: service.namespace=opentelemetry-demo + OTEL_SERVICE_NAME: productcatalogservice + FEATURE_FLAG_GRPC_SERVICE_ADDR: no.exist:80 + depends_on: + - oap + logging: *logging + networks: + - e2e + + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + - 9412 + networks: + - e2e + ports: + - 12800 + - 9412 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_RECEIVER_ZIPKIN: default + SW_QUERY_ZIPKIN: default + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + +networks: + e2e: diff --git a/test/e2e/cases/otlp-traces/e2e.yaml b/test/e2e/cases/otlp-traces/e2e.yaml new file mode 100644 index 0000000..4fc9e94 --- /dev/null +++ b/test/e2e/cases/otlp-traces/e2e.yaml @@ -0,0 +1,58 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# OTLP Traces E2E — native OAP with BanyanDB +# Validates OpenTelemetry trace ingestion via OTLP and query via Zipkin API. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${frontend_host}:${frontend_8080}/api/products + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + # service name + - query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/services + expected: ../../../../skywalking/test/e2e-v2/cases/otlp-traces/expected/service-name.yml + # remote-service name + - query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/remoteServices?serviceName=frontend + expected: ../../../../skywalking/test/e2e-v2/cases/otlp-traces/expected/remote-service-name.yml + # span name + - query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/spans?serviceName=productcatalogservice + expected: ../../../../skywalking/test/e2e-v2/cases/otlp-traces/expected/span-name.yml + # traces + - query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/traces\?limit\=1\&serviceName\=productcatalogservice\&spanName\=oteldemo.productcatalogservice/listproducts | yq e 'del(..|.tags?, ..|.annotations?)' - + expected: ../../../../skywalking/test/e2e-v2/cases/otlp-traces/expected/traces.yml + # autocomplete + - query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/autocompleteValues?key=http.method + expected: ../../../../skywalking/test/e2e-v2/cases/otlp-traces/expected/autocomplete.yml diff --git a/test/e2e/cases/so11y/docker-compose.yml b/test/e2e/cases/so11y/docker-compose.yml new file mode 100644 index 0000000..04065bd --- /dev/null +++ b/test/e2e/cases/so11y/docker-compose.yml @@ -0,0 +1,142 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + - 1234 + networks: + - e2e + ports: + - 12800 + - 1234 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_PROMETHEUS_FETCHER: default + SW_TELEMETRY: prometheus + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + otel-collector: + image: otel/opentelemetry-collector:0.102.1 + networks: + - e2e + command: ["--config=/etc/otel-collector-config.yaml"] + volumes: + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml + depends_on: + oap: + condition: service_healthy + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/so11y/e2e.yaml b/test/e2e/cases/so11y/e2e.yaml new file mode 100644 index 0000000..06ae3a2 --- /dev/null +++ b/test/e2e/cases/so11y/e2e.yaml @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Self-Observability E2E — native OAP with BanyanDB +# Validates OAP self-monitoring via Prometheus telemetry + OTEL collector. +# Adapted for native image: no JVM metrics (no jvm_memory, jvm_thread, jvm_class). + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - so11y-cases.yaml diff --git a/test/e2e/cases/so11y/otel-collector-config.yaml b/test/e2e/cases/so11y/otel-collector-config.yaml new file mode 100644 index 0000000..3593d72 --- /dev/null +++ b/test/e2e/cases/so11y/otel-collector-config.yaml @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +receivers: + prometheus: + config: + scrape_configs: + - job_name: 'skywalking-so11y' + scrape_interval: 5s + static_configs: + - targets: ['oap:1234'] + labels: + host_name: http://localhost:1234 + service: oap-server +processors: + batch: + +exporters: + otlp: + endpoint: oap:11800 + tls: + insecure: true + logging: + loglevel: debug + +service: + pipelines: + metrics: + receivers: + - prometheus + processors: + - batch + exporters: + - otlp + - logging diff --git a/test/e2e/cases/so11y/so11y-cases.yaml b/test/e2e/cases/so11y/so11y-cases.yaml new file mode 100644 index 0000000..698938d --- /dev/null +++ b/test/e2e/cases/so11y/so11y-cases.yaml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Self-observability test cases for native image. +# Only application-level metrics are tested (no JVM metrics in native image). + + cases: + # layer list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql layer ls + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/layer.yml + # service list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/service.yml + # service instance list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/service-instance.yml + # OAP application-level metrics (available in native image) + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_oap_instance_trace_count --instance-name=http://localhost:1234 --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/metrics-has-value-label-trace.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="meter_oap_instance_metrics_aggregation{level='L1 aggregation'}" --instance-name=http://localhost:1234 --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/metrics-has-value-label.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_oap_instance_persistence_prepare_count --instance-name=http://localhost:1234 --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/metrics-has-value.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=meter_oap_instance_persistence_execute_count --instance-name=http://localhost:1234 --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/metrics-has-value.yml + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="meter_oap_instance_trace_latency_percentile{p='90,99'}" --instance-name=http://localhost:1234 --service-name=oap-server + expected: ../../../../skywalking/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml diff --git a/test/e2e/cases/ssl/docker-compose.yml b/test/e2e/cases/ssl/docker-compose.yml new file mode 100644 index 0000000..f047968 --- /dev/null +++ b/test/e2e/cases/ssl/docker-compose.yml @@ -0,0 +1,135 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + volumes: + - ../../../../skywalking/test/e2e-v2/cases/simple/ssl/certs:/skywalking/certs + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_CORE_GRPC_SSL_ENABLED: "true" + SW_CORE_GRPC_SSL_KEY_PATH: /skywalking/certs/server-key.pem + SW_CORE_GRPC_SSL_CERT_CHAIN_PATH: /skywalking/certs/server.crt + SW_CORE_GRPC_SSL_TRUSTED_CA_PATH: /skywalking/certs/ca.crt + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/ssl/ca:/skywalking/agent/ca + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/ssl/ca:/skywalking/agent/ca + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/ssl/e2e.yaml b/test/e2e/cases/ssl/e2e.yaml new file mode 100644 index 0000000..5c2e6b8 --- /dev/null +++ b/test/e2e/cases/ssl/e2e.yaml @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# SSL E2E — native OAP with BanyanDB and TLS-encrypted gRPC +# Validates that TLS communication works with native image. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/simple/simple-cases.yaml diff --git a/test/e2e/cases/virtual-mq/docker-compose.yml b/test/e2e/cases/virtual-mq/docker-compose.yml new file mode 100644 index 0000000..a30ba91 --- /dev/null +++ b/test/e2e/cases/virtual-mq/docker-compose.yml @@ -0,0 +1,156 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_REPORT_INTERVAL: 5 + SW_METER_ACTIVE: 'false' + kafka_enable: "true" + kafka_topic: topic + kafka_server: kafka:9092 + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + kafka: + condition: service_started + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800 + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + kafka_enable: "true" + kafka_topic: topic + kafka_server: kafka:9092 + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + + zookeeper: + image: zookeeper:3.9.3 + networks: + - e2e + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + + kafka: + image: bitnamilegacy/kafka:2.4.1 + networks: + - e2e + environment: + - KAFKA_BROKER_ID=1 + - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092 + - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092 + - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 + - ALLOW_PLAINTEXT_LISTENER=yes + depends_on: + - zookeeper + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/virtual-mq/e2e.yaml b/test/e2e/cases/virtual-mq/e2e.yaml new file mode 100644 index 0000000..bdbb6cf --- /dev/null +++ b/test/e2e/cases/virtual-mq/e2e.yaml @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Virtual MQ E2E — native OAP with BanyanDB +# Validates virtual MQ layer metrics (Kafka instrumentation via Java agent). + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${provider_host}:${provider_9090}/kafka/send + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/virtual-mq/mq-cases.yaml
