From 133b2e4ad98c090f44cef9c00887ae82e472da0d Mon Sep 17 00:00:00 2001 From: Jiajing LU Date: Mon, 23 May 2022 09:31:29 +0800 Subject: [PATCH] Add event E2E for BanyanDB (#9119) --- .github/workflows/skywalking.yaml | 2 + .../cases/event/banyandb/docker-compose.yml | 40 +++++++++++++++++++ test/e2e-v2/cases/event/banyandb/e2e.yaml | 37 +++++++++++++++++ .../ebpf/banyandb/docker-compose.yml | 13 ++---- .../cases/profiling/ebpf/docker-compose.yml | 5 +++ .../trace/banyandb/docker-compose.yml | 13 ++---- .../cases/storage/banyandb/docker-compose.yml | 13 ++---- .../script/docker-compose/base-compose.yml | 14 +++++++ 8 files changed, 107 insertions(+), 30 deletions(-) create mode 100644 test/e2e-v2/cases/event/banyandb/docker-compose.yml create mode 100644 test/e2e-v2/cases/event/banyandb/e2e.yaml diff --git a/.github/workflows/skywalking.yaml b/.github/workflows/skywalking.yaml index 16be2c364f..1a759535fe 100644 --- a/.github/workflows/skywalking.yaml +++ b/.github/workflows/skywalking.yaml @@ -346,6 +346,8 @@ jobs: config: test/e2e-v2/cases/ttl/es/e2e.yaml env: ES_VERSION=8.0.0 + - name: Event BanyanDB + config: test/e2e-v2/cases/event/banyandb/e2e.yaml - name: Event H2 config: test/e2e-v2/cases/event/h2/e2e.yaml - name: Event ES diff --git a/test/e2e-v2/cases/event/banyandb/docker-compose.yml b/test/e2e-v2/cases/event/banyandb/docker-compose.yml new file mode 100644 index 0000000000..551c4063b7 --- /dev/null +++ b/test/e2e-v2/cases/event/banyandb/docker-compose.yml @@ -0,0 +1,40 @@ +# 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.8' + +services: + banyandb: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: banyandb + networks: + - e2e + + oap: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: oap + environment: + SW_STORAGE: banyandb + depends_on: + banyandb: + condition: service_healthy + ports: + - 11800 + - 12800 + +networks: + e2e: diff --git a/test/e2e-v2/cases/event/banyandb/e2e.yaml b/test/e2e-v2/cases/event/banyandb/e2e.yaml new file mode 100644 index 0000000000..c957da2316 --- /dev/null +++ b/test/e2e-v2/cases/event/banyandb/e2e.yaml @@ -0,0 +1,37 @@ +# 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. + +# This file is used to show how to write configuration files and can be used to test. + +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 test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../event-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml b/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml index 94910b232f..617c1a2032 100644 --- a/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml +++ b/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml @@ -17,17 +17,11 @@ version: '2.1' services: banyandb: - image: "ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}" + extends: + file: ../docker-compose.yml + service: banyandb networks: - e2e - expose: - - 17912 - command: standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data - healthcheck: - test: [ "CMD", "sh", "-c", "nc -nz 127.0.0.1 17912" ] - interval: 5s - timeout: 60s - retries: 120 oap: extends: @@ -37,7 +31,6 @@ services: - e2e environment: SW_STORAGE: banyandb - SW_STORAGE_BANYANDB_HOST: "banyandb" depends_on: banyandb: condition: service_healthy diff --git a/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml b/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml index cff480fde8..684ca2cedc 100644 --- a/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml +++ b/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml @@ -21,6 +21,11 @@ services: file: ../../../script/docker-compose/base-compose.yml service: oap + banyandb: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: banyandb + sqrt: build: context: . diff --git a/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml b/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml index ff1b74caeb..26502d7fff 100644 --- a/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml +++ b/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml @@ -17,17 +17,11 @@ version: '3.8' services: banyandb: - image: "ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}" + extends: + file: ../../../../script/docker-compose/base-compose.yml + service: banyandb networks: - e2e - expose: - - 17912 - command: standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data - healthcheck: - test: [ "CMD", "sh", "-c", "nc -nz 127.0.0.1 17912" ] - interval: 5s - timeout: 60s - retries: 120 provider: extends: @@ -45,7 +39,6 @@ services: service: oap environment: SW_STORAGE: banyandb - SW_STORAGE_BANYANDB_HOST: "banyandb" depends_on: banyandb: condition: service_healthy diff --git a/test/e2e-v2/cases/storage/banyandb/docker-compose.yml b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml index 7280532dfd..0e829a1469 100644 --- a/test/e2e-v2/cases/storage/banyandb/docker-compose.yml +++ b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml @@ -17,17 +17,11 @@ version: '2.1' services: banyandb: - image: "ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}" + extends: + file: ../../../script/docker-compose/base-compose.yml + service: banyandb networks: - e2e - expose: - - 17912 - command: standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data - healthcheck: - test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 17912"] - interval: 5s - timeout: 60s - retries: 120 oap: extends: @@ -35,7 +29,6 @@ services: service: oap environment: SW_STORAGE: banyandb - SW_STORAGE_BANYANDB_HOST: "banyandb" ports: - 12800 depends_on: diff --git a/test/e2e-v2/script/docker-compose/base-compose.yml b/test/e2e-v2/script/docker-compose/base-compose.yml index bcd586ceb0..20cc63228b 100644 --- a/test/e2e-v2/script/docker-compose/base-compose.yml +++ b/test/e2e-v2/script/docker-compose/base-compose.yml @@ -33,6 +33,7 @@ services: SW_STORAGE_ES_CLUSTER_NODES: es:9200 SW_JDBC_URL: jdbc:mysql://mysql:3306/swtest SW_STORAGE_INFLUXDB_URL: http://influxdb:8086 + SW_STORAGE_BANYANDB_HOST: "banyandb" SW_STORAGE_IOTDB_HOST: iotdb SW_STORAGE_IOTDB_SESSIONPOOL_SIZE: 2 SW_CONFIG_ETCD_PERIOD: 1 @@ -52,6 +53,19 @@ services: - e2e environment: - SW_OAP_ADDRESS=http://oap:12800 + + banyandb: + image: "ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}" + networks: + - e2e + expose: + - 17912 + command: standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data + healthcheck: + test: [ "CMD", "sh", "-c", "nc -nz 127.0.0.1 17912" ] + interval: 5s + timeout: 60s + retries: 120 provider: image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" -- GitLab