diff --git a/.github/workflows/e2e.jdk-versions.yaml b/.github/workflows/e2e.jdk-versions.yaml index b9e96ccbfc..b68b6a2842 100644 --- a/.github/workflows/e2e.jdk-versions.yaml +++ b/.github/workflows/e2e.jdk-versions.yaml @@ -35,7 +35,6 @@ jobs: matrix: jdk: [ 8, 11, 12, 13, 14, 15 ] env: - SW_SIMPLE_CASE: jdk SW_AGENT_JDK_VERSION: ${{ matrix.jdk }} SW_OAP_BASE_IMAGE: adoptopenjdk/openjdk${{ matrix.jdk }}:alpine-jre steps: @@ -52,9 +51,9 @@ jobs: java-version: ${{ matrix.jdk }} - name: Run E2E Test if: env.SKIP_CI != 'true' - uses: ./.github/actions/e2e-test + uses: ./.github/actions/infra-e2e-test with: - test_class: org.apache.skywalking.e2e.simple.SimpleE2E + config-file: simple/jdk/e2e.yaml Single: if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 6b944a5fa9..ede7f108f2 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,14 +35,18 @@ concurrency: jobs: FeatureGroup01: if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') - name: Feature + name: ${{ matrix.case.name }} runs-on: ubuntu-latest timeout-minutes: 90 strategy: matrix: - case: [auth, ssl, mtls] - env: - SW_SIMPLE_CASE: ${{ matrix.case }} + case: + - name: Auth + config-file: simple/auth/e2e.yaml + - name: SSL + config-file: simple/ssl/e2e.yaml + - name: mTLS + config-file: simple/mtls/e2e.yaml steps: - uses: actions/checkout@v2 with: @@ -51,9 +55,9 @@ jobs: uses: ./.github/actions/skip - name: Run E2E Test if: env.SKIP_CI != 'true' - uses: ./.github/actions/e2e-test + uses: ./.github/actions/infra-e2e-test with: - test_class: org.apache.skywalking.e2e.simple.SimpleE2E + config-file: ${{ matrix.case.config-file }} FeatureGroup02: if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule') diff --git a/CHANGES.md b/CHANGES.md index 76d2df0e26..d4a5782de9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ Release Notes. #### OAP Server * Fix wrong (de)serializer of ElasticSearch client for OpenSearch storage. * Fix that traces query with tags will report error. - +* Replace e2e simple cases to e2e-v2. #### UI diff --git a/test/e2e-v2/cases/simple/auth/docker-compose.yml b/test/e2e-v2/cases/simple/auth/docker-compose.yml new file mode 100644 index 0000000000..54ada05cbd --- /dev/null +++ b/test/e2e-v2/cases/simple/auth/docker-compose.yml @@ -0,0 +1,52 @@ +# 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: '2.1' + +services: + oap: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: oap + environment: + SW_AUTHENTICATION: test-token + ports: + - 12800 + provider: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: provider + environment: + SW_AGENT_AUTHENTICATION: test-token + ports: + - 9090 + depends_on: + oap: + condition: service_healthy + + consumer: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: consumer + environment: + SW_AGENT_AUTHENTICATION: test-token + ports: + - 9092 + depends_on: + provider: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e-v2/cases/simple/auth/e2e.yaml b/test/e2e-v2/cases/simple/auth/e2e.yaml new file mode 100644 index 0000000000..e8473d3ce8 --- /dev/null +++ b/test/e2e-v2/cases/simple/auth/e2e.yaml @@ -0,0 +1,75 @@ +# 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: 1200 + init-system-environment: ../../../script/env + steps: + - 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 + - name: install etcdctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl + +cleanup: + on: always + +trigger: + action: http + interval: 10s + times: 10 + url: http://${consumer_host}:${consumer_9092}/info + method: POST + +verify: + # verify with retry strategy + retry: + # max retry count + count: 20 + # the interval between two retries, in millisecond. + interval: 10000 + cases: + # service list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls + expected: ../expected/service.yml + # service metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # service endpoint + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/service-endpoint.yml + # service endpoint metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # dependency service + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/dependency-services.yml + # service instance list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider + expected: ../expected/service-instance.yml + + # dependency instance + + # trace segment list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls + expected: ../expected/traces-list.yml + # trace detail + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}') + expected: ../expected/trace-info-detail.yml \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/dependency-services.yml b/test/e2e-v2/cases/simple/expected/dependency-services.yml new file mode 100644 index 0000000000..7b6996c917 --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/dependency-services.yml @@ -0,0 +1,73 @@ +# 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. + +nodes: +{{- range .nodes }} +{{- if eq .name "User" }} +- id: {{ b64enc "User" }}.0 + name: User + type: USER + isreal: false +{{- end }} +{{- if eq .name "e2e-service-provider" }} +- id: {{ b64enc "e2e-service-provider"}}.1 + name: e2e-service-provider + type: Tomcat + isreal: true +{{- end }} +{{- if eq .name "e2e-service-consumer" }} +- id: {{ b64enc "e2e-service-consumer"}}.1 + name: e2e-service-consumer + type: Tomcat + isreal: true +{{- end }} +{{- if eq .name "localhost:-1" }} +- id: {{ b64enc "localhost:-1" }}.0 + name: localhost:-1 + type: H2 + isreal: false +{{- end }} +{{- end }} +calls: +{{- range .calls }} +{{- if eq .source "ZTJlLXNlcnZpY2UtY29uc3VtZXI=.1" }} +- source: {{ b64enc "e2e-service-consumer"}}.1 + sourcecomponents: [] + target: {{ b64enc "e2e-service-provider"}}.1 + targetcomponents: [] + id: {{ b64enc "e2e-service-consumer"}}.1-{{ b64enc "e2e-service-provider"}}.1 + detectpoints: + - CLIENT + - SERVER +{{- end }} +{{- if eq .source "ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1" }} +- source: {{ b64enc "e2e-service-provider" }}.1 + sourcecomponents: [] + target: {{ b64enc "localhost:-1"}}.0 + targetcomponents: [] + id: {{ b64enc "e2e-service-provider" }}.1-{{ b64enc "localhost:-1"}}.0 + detectpoints: + - CLIENT +{{- end }} +{{- if eq .source "VXNlcg==.0" }} +- source: {{ b64enc "User" }}.0 + sourcecomponents: [] + target: {{ b64enc "e2e-service-consumer"}}.1 + targetcomponents: [] + id: {{ b64enc "User" }}.0-{{ b64enc "e2e-service-consumer"}}.1 + detectpoints: + - SERVER +{{- end }} +{{- end }} diff --git a/test/e2e-v2/cases/simple/expected/metrics-has-value.yml b/test/e2e-v2/cases/simple/expected/metrics-has-value.yml new file mode 100644 index 0000000000..27ae47c8ff --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/metrics-has-value.yml @@ -0,0 +1,21 @@ +# 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. + +{{- contains . }} +- key: {{ notEmpty .key }} + value: {{ ge .value 0 }} +- key: {{ notEmpty .key }} + value: {{ ge .value 1 }} +{{- end }} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/service-endpoint.yml b/test/e2e-v2/cases/simple/expected/service-endpoint.yml new file mode 100644 index 0000000000..30b1efb4c7 --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/service-endpoint.yml @@ -0,0 +1,21 @@ +# 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. + +{{- range .}} +{{- if eq .name "POST:/info" }} +- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/info" }} + name: POST:/info +{{- end}} +{{- end}} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/service-instance.yml b/test/e2e-v2/cases/simple/expected/service-instance.yml new file mode 100644 index 0000000000..ef74087afa --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/service-instance.yml @@ -0,0 +1,54 @@ +# Licensed to 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. Apache Software Foundation (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. + +{{- range .}} +- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }} + name: {{ notEmpty .name }} + attributes: + {{- range .attributes }} + {{- if eq .name "OS Name" }} + - name: OS Name + value: Linux + {{- end }} + {{- if eq .name "hostname" }} + - name: hostname + value: {{ notEmpty .value }} + {{- end }} + {{- if eq .name "Process No." }} + - name: Process No. + value: "1" + {{- end }} + {{- if eq .name "Start Time" }} + - name: Start Time + value: {{ notEmpty .value }} + {{- end }} + {{- if eq .name "JVM Arguments" }} + - name: JVM Arguments + value: '{{ notEmpty .value }}' + {{- end }} + {{- if eq .name "Jar Dependencies" }} + - name: Jar Dependencies + value: '{{ notEmpty .value }}' + {{- end }} + {{- if eq .name "ipv4s" }} + - name: ipv4s + value: {{ notEmpty .value }} + {{- end }} + {{- end}} + language: JAVA + instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }} +{{- end}} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/service.yml b/test/e2e-v2/cases/simple/expected/service.yml new file mode 100644 index 0000000000..e299d8b97e --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/service.yml @@ -0,0 +1,27 @@ +# 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. + +{{- range . }} +{{- if eq .name "e2e-service-provider" }} +- id: {{ b64enc "e2e-service-provider" }}.1 + name: e2e-service-provider + group: "" +{{- end }} +{{- if eq .name "e2e-service-consumer" }} +- id: {{ b64enc "e2e-service-consumer" }}.1 + name: e2e-service-consumer + group: "" +{{- end }} +{{- end }} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/trace-info-detail.yml b/test/e2e-v2/cases/simple/expected/trace-info-detail.yml new file mode 100644 index 0000000000..836705a63c --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/trace-info-detail.yml @@ -0,0 +1,72 @@ +# 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. + +spans: + {{- range .spans}} + - traceid: {{ notEmpty .traceid }} + segmentid: {{ notEmpty .segmentid }} + spanid: {{ .spanid }} + parentspanid: {{ .parentspanid }} + refs: + {{- if eq .servicecode "e2e-service-provider" }} + {{- range .refs }} + - traceid: {{ notEmpty .traceid }} + parentsegmentid: {{ notEmpty .parentsegmentid }} + parentspanid: 1 + type: CROSS_PROCESS + {{- end }} + {{- end }} + {{- if eq .servicecode "e2e-service-consumer" }} + [] + {{- end }} + servicecode: {{ notEmpty .servicecode }} + serviceinstancename: {{ notEmpty .serviceinstancename }} + starttime: {{ gt .starttime 0 }} + endtime: {{ gt .endtime 0 }} + endpointname: + {{- if eq .type "Exit" }} + /info + {{ else }} + POST:/info + {{- end }} + type: {{ notEmpty .type }} + peer: + {{- if eq .type "Exit" }} + provider:9090 + {{ else }} + "" + {{- end }} + component: + {{- if eq .type "Exit" }} + SpringRestTemplate + {{- end }} + {{- if eq .type "Entry" }} + Tomcat + {{- end }} + iserror: false + layer: Http + tags: + {{- range .tags }} + {{- if eq .key "http.method" }} + - key: http.method + value: POST + {{- end }} + {{- if eq .key "url" }} + - key: url + value: {{ notEmpty .value }} + {{- end }} + {{- end }} + logs: [] + {{- end }} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/expected/traces-list.yml b/test/e2e-v2/cases/simple/expected/traces-list.yml new file mode 100644 index 0000000000..0bbf661a0d --- /dev/null +++ b/test/e2e-v2/cases/simple/expected/traces-list.yml @@ -0,0 +1,41 @@ +# 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. + +traces: +{{- range .traces }} +- segmentid: {{ notEmpty .segmentid }} + endpointnames: + {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/execute" }} + - H2/JDBI/Statement/execute + {{- end}} + {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/executeQuery" }} + - H2/JDBI/Statement/executeQuery + {{- end}} + {{- if eq (index .endpointnames 0) "H2/JDBI/PreparedStatement/executeQuery" }} + - H2/JDBI/PreparedStatement/executeQuery + {{- end }} + {{- if eq (index .endpointnames 0) "POST:/info" }} + - POST:/info + {{- end }} + {{- if eq (index .endpointnames 0) "POST:/users" }} + - POST:/users + {{- end }} + duration: {{ ge .duration 0 }} + start: "{{ notEmpty .start}}" + iserror: false + traceids: + - {{ (index .traceids 0) }} +{{- end }} +total: {{ gt .total 0 }} \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/jdk/docker-compose.yml b/test/e2e-v2/cases/simple/jdk/docker-compose.yml new file mode 100644 index 0000000000..879eae6261 --- /dev/null +++ b/test/e2e-v2/cases/simple/jdk/docker-compose.yml @@ -0,0 +1,46 @@ +# 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: '2.1' + +services: + oap: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: oap + ports: + - 12800 + provider: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: provider + ports: + - 9090 + depends_on: + oap: + condition: service_healthy + + consumer: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: consumer + ports: + - 9092 + depends_on: + provider: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e-v2/cases/simple/jdk/e2e.yaml b/test/e2e-v2/cases/simple/jdk/e2e.yaml new file mode 100644 index 0000000000..e8473d3ce8 --- /dev/null +++ b/test/e2e-v2/cases/simple/jdk/e2e.yaml @@ -0,0 +1,75 @@ +# 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: 1200 + init-system-environment: ../../../script/env + steps: + - 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 + - name: install etcdctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl + +cleanup: + on: always + +trigger: + action: http + interval: 10s + times: 10 + url: http://${consumer_host}:${consumer_9092}/info + method: POST + +verify: + # verify with retry strategy + retry: + # max retry count + count: 20 + # the interval between two retries, in millisecond. + interval: 10000 + cases: + # service list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls + expected: ../expected/service.yml + # service metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # service endpoint + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/service-endpoint.yml + # service endpoint metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # dependency service + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/dependency-services.yml + # service instance list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider + expected: ../expected/service-instance.yml + + # dependency instance + + # trace segment list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls + expected: ../expected/traces-list.yml + # trace detail + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}') + expected: ../expected/trace-info-detail.yml \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/mtls/client/ca.crt b/test/e2e-v2/cases/simple/mtls/client/ca.crt new file mode 100644 index 0000000000..1f52398dd2 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/client/ca.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEmDCCAoACCQCHw9DXRSuLGDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANv +YXAwHhcNMjEwODI2MDIzOTM0WhcNMjIwODI2MDIzOTM0WjAOMQwwCgYDVQQDDANv +YXAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDBrmOmHjb3OrbXXbF8 +09uuV8f8ITI1H1AceoD6Ak1yovanCxvvCvcKgZ4hLtPlUldg8fBqo3SivyzYbd4N +082K8yYeoGHBKSaW5ckO126IHAzMHLCzw5qDgqTHHoovWQVv5VKCJC2y4xpeeakY +ifk2DWPmou/rkKzZyflWMn7b0+bi81IQJgDz01UF19OAXXx4jp53yCKPwp+Que9R +AIrlYXuBHkpwbDDs7vtCMSa/j+Klw8eAcZAm1NO3Y8VpG+uMxTFfVLr0nGvKMEKO +0P3q1mp2NML/sNP89RHZsXM/eYU1UE0Da1aQ/o+fivXs3CRStxwFMwCMg/+uXccT +Raufz0OhEwRJa0zbn8XBvcvLJ7kmXio3df23fSPT/i9whyQujfXE7cAraOEj8KjI +NUDTi6dASlUeoNoKsklB4P3UIUCwCvZu9PqU9v7Oz8tOsxNpGvY2oBA+tVwZ1U/p +ON992LmGZz2J9xpDjojCddUS5tRZGD0itMWlJiLaRd7VSPLRuyUGLqbEjf/7GffO +Tb/5R7DhcKSFdrNXisz/kjU4qSwYFJ9WzUbbraV3MNiJiRa0eHGbLffHKVIvVcPI +scaP04nTTbX7l4qUPmX/YcTNEZV0HDC3s0Qxk0y6lXxu3rDue1yx+N+S0TwCSq8D +hpIDLWi/fYLbAoYnqv5jJxbnLQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQB84/85 +KA2S2iXHhN1bkEx0cIjkg2t16Ht+b602na4bmZIpxUVzUv6dqiwCx5wDyM96T3OX +xRDO8uVQEUMJ+76dm53UFZ9uhtGBvSFc8YqnL+EoXD1IQ8IQ7PVVf4dyzKyxhtK2 +XHr6RPtDnLhHy6mxQ5eaqBTaZ1dLoQlAIPyzh2mX2px+jGu9DKQxrZQ+0aMklidW +xSDLLGr7cK+tQln4P0DC61uLS/VGQ+15a6XpqF3FhhspJrQPse+WSC015KCdSgnZ +dIDxqtPS+hhyw5o4C39KDHD0x04VVIEhMsX3Z2eykK0KXnnsPcXWdFj/pR55Kcr3 +qPfxGRLrEeYvoUUzr2APiHTPzWsUDwugfV9KXyGYuxIqqOpPr5nWqGfo9ZcvbH7K +Mqc32DFvFdNnUqMYQHu9oigjfCvscdNTrWHlGYD3HJmWZur4IBReb8uG5qPN+VLH +1xs7EcW6NN6A1pndHEosAFcVIh5kx4gRCsZMsEdGExn4gkTknfBosWo0tROV00UU +UYFqLZfUmJyPDVYZf1fjiLd+yC2qJERNxWWy03JG5UZDLc03ULPlqys+MCT8rRdD +b7p2WGOQBM9whNC5BC6SydFPphwc3yhR1jmMSz+QB18Easo7RV6fmhE462wj1EoH ++IDtJX6JRGguky29ibdolQUiRK3rVowGpIjjgw== +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/mtls/client/client.crt b/test/e2e-v2/cases/simple/mtls/client/client.crt new file mode 100644 index 0000000000..c6321bb800 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/client/client.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIElTCCAn0CAQEwDQYJKoZIhvcNAQEFBQAwDjEMMAoGA1UEAwwDb2FwMB4XDTIx +MDgyNjAyMzkzN1oXDTIyMDgyNjAyMzkzN1owEzERMA8GA1UEAwwIcHJvdmlkZXIw +ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDnXZ54vJNK/xAwrunMJf2l +DgdsKfdAkW70LpzAFVq/lXjZXM0FxG4Kl/pR0cTf69MdhNxEQffyv42bjAEDIWQ/ +FhtPa0mApL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6EKHTk1idfLc+HhL3a6vlqx0CxpupXi +K5Lz2UCs6DIoyqYI0vciaa9xVsxhIbfXasXPp1Jflz2k4NRn0LuS8WSQds+Sall2 +A0GwKZjc7DkgKzsQaxk3BEi44XH8WaXDuFBQY5AEzQEGA/kcwKsKg0pggGt9Usrk +mmB5QDUDC0NeQKcCE45POcrUuNbfvMKoLjj+SlkOmcJUBjcDlroNCBSPDuRRZswS +eBPbdGuiYYZj52ImTm/ytg7ksehW+fGolg== +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/mtls/client/client.pem b/test/e2e-v2/cases/simple/mtls/client/client.pem new file mode 100644 index 0000000000..f8a135dcda --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/client/client.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJRQIBADANBgkqhkiG9w0BAQEFAASCCS8wggkrAgEAAoICAQDnXZ54vJNK/xAw +runMJf2lDgdsKfdAkW70LpzAFVq/lXjZXM0FxG4Kl/pR0cTf69MdhNxEQffyv42b +jAEDIWQ/FhtPa0mApLAd0gAGZ920ANS6XRw9QV4UujxOzTyivxOHU4LQ8s+xo6X3 +jZQ6rzdMKeFYu4uEDZj7J0aN4d68HDhAiQFtmDxJ4AOyMpQ+6VzuC8RslcKXeO1m +hzHbbYwNe1cMaLMzJpcgw7mpTF3iGkiSO5dEbTmEdmEdTDikJtoQvB7YISMeKeFe +1BE19ccFn06mPh7fgBEJsBZmkPflpksjFG9VTbdC0qiz4NIA/t1Sjig65p6uEOkV +1KwyTzxp53P962prYw/yYtCftgPtrQeW9u7xJ81MkR4WLi9ut6UKyHSsgZwRtK4n +Int+avDc3CPHGuZfSg7Cf8Ll6dUc7UGVJoFCY3zZjeZ+JcxD52hPfOXBmsG1QF1L +UBO0+DwlsnwJVIeRTRtVgMp64iKzvjpqAU/ydZNr7JbBYMw9kLSi/Lv8UDfXyB2h +0fmWLXOBeWSfoNZTUlIS+D03Q6UwbH45VBiYz0+PWN7ywa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/THdKWquZTZxi1UMhtd1Z +O/rA4rZEe8QBoDkMqJYzkTkk/w/PLxDaV2NXQWssGFM+lCER3S0vAWE6CpKSB6Wn +DxpUrQKCAQEAi0/qs9bdnxjmZWJHyDhx0CNuEytyVB+o48e1bHa7Vr/paojbfKV9 +6LeNHiaMI3Uanu1yqueuEkqc7uf6ac+AEX1oRKd6s0HkxbTkzGrYcC1RZ67aRfD7 +iwNkjg0rMkNVkJGC5RTysGVTKo6Wu1K4HW0Ztj0S+UW4Cd8Z0LT1bZr2K47E9wKJ +gEIjbgOAjCmV9tNKOUN4JBWo02aT+vPW7NzMP0XxRKwT3QvxnumXciUsQWmm+C4B +aUmvvXGy1Drq5nTGJu2hPvZ+0t/TpmIqlRU0GPevv4zFNI5oLocFDSZgx8CTEnSY +7fL3g6gq14QLJJhYzF1FkGFQZw7iH2gvBg== +-----END PRIVATE KEY----- diff --git a/test/e2e-v2/cases/simple/mtls/docker-compose.yml b/test/e2e-v2/cases/simple/mtls/docker-compose.yml new file mode 100644 index 0000000000..7cba0e6927 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/docker-compose.yml @@ -0,0 +1,71 @@ +# 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: '2.1' + +services: + oap: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: oap + volumes: + - ./server:/skywalking/certs + environment: + 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 + expose: + - 11811 + ports: + - 12800 + + provider: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: provider + volumes: + - ./client:/skywalking/agent/certs + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + 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 + ports: + - 9090 + depends_on: + oap: + condition: service_healthy + + consumer: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: consumer + volumes: + - ./client:/skywalking/agent/certs + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + 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 + ports: + - 9092 + depends_on: + provider: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e-v2/cases/simple/mtls/e2e.yaml b/test/e2e-v2/cases/simple/mtls/e2e.yaml new file mode 100644 index 0000000000..e8473d3ce8 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/e2e.yaml @@ -0,0 +1,75 @@ +# 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: 1200 + init-system-environment: ../../../script/env + steps: + - 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 + - name: install etcdctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl + +cleanup: + on: always + +trigger: + action: http + interval: 10s + times: 10 + url: http://${consumer_host}:${consumer_9092}/info + method: POST + +verify: + # verify with retry strategy + retry: + # max retry count + count: 20 + # the interval between two retries, in millisecond. + interval: 10000 + cases: + # service list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls + expected: ../expected/service.yml + # service metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # service endpoint + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/service-endpoint.yml + # service endpoint metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # dependency service + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/dependency-services.yml + # service instance list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider + expected: ../expected/service-instance.yml + + # dependency instance + + # trace segment list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls + expected: ../expected/traces-list.yml + # trace detail + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}') + expected: ../expected/trace-info-detail.yml \ No newline at end of file diff --git a/test/e2e-v2/cases/simple/mtls/server/ca.crt b/test/e2e-v2/cases/simple/mtls/server/ca.crt new file mode 100644 index 0000000000..1f52398dd2 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/server/ca.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEmDCCAoACCQCHw9DXRSuLGDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANv +YXAwHhcNMjEwODI2MDIzOTM0WhcNMjIwODI2MDIzOTM0WjAOMQwwCgYDVQQDDANv +YXAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDBrmOmHjb3OrbXXbF8 +09uuV8f8ITI1H1AceoD6Ak1yovanCxvvCvcKgZ4hLtPlUldg8fBqo3SivyzYbd4N +082K8yYeoGHBKSaW5ckO126IHAzMHLCzw5qDgqTHHoovWQVv5VKCJC2y4xpeeakY +ifk2DWPmou/rkKzZyflWMn7b0+bi81IQJgDz01UF19OAXXx4jp53yCKPwp+Que9R +AIrlYXuBHkpwbDDs7vtCMSa/j+Klw8eAcZAm1NO3Y8VpG+uMxTFfVLr0nGvKMEKO +0P3q1mp2NML/sNP89RHZsXM/eYU1UE0Da1aQ/o+fivXs3CRStxwFMwCMg/+uXccT +Raufz0OhEwRJa0zbn8XBvcvLJ7kmXio3df23fSPT/i9whyQujfXE7cAraOEj8KjI +NUDTi6dASlUeoNoKsklB4P3UIUCwCvZu9PqU9v7Oz8tOsxNpGvY2oBA+tVwZ1U/p +ON992LmGZz2J9xpDjojCddUS5tRZGD0itMWlJiLaRd7VSPLRuyUGLqbEjf/7GffO +Tb/5R7DhcKSFdrNXisz/kjU4qSwYFJ9WzUbbraV3MNiJiRa0eHGbLffHKVIvVcPI +scaP04nTTbX7l4qUPmX/YcTNEZV0HDC3s0Qxk0y6lXxu3rDue1yx+N+S0TwCSq8D +hpIDLWi/fYLbAoYnqv5jJxbnLQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQB84/85 +KA2S2iXHhN1bkEx0cIjkg2t16Ht+b602na4bmZIpxUVzUv6dqiwCx5wDyM96T3OX +xRDO8uVQEUMJ+76dm53UFZ9uhtGBvSFc8YqnL+EoXD1IQ8IQ7PVVf4dyzKyxhtK2 +XHr6RPtDnLhHy6mxQ5eaqBTaZ1dLoQlAIPyzh2mX2px+jGu9DKQxrZQ+0aMklidW +xSDLLGr7cK+tQln4P0DC61uLS/VGQ+15a6XpqF3FhhspJrQPse+WSC015KCdSgnZ +dIDxqtPS+hhyw5o4C39KDHD0x04VVIEhMsX3Z2eykK0KXnnsPcXWdFj/pR55Kcr3 +qPfxGRLrEeYvoUUzr2APiHTPzWsUDwugfV9KXyGYuxIqqOpPr5nWqGfo9ZcvbH7K +Mqc32DFvFdNnUqMYQHu9oigjfCvscdNTrWHlGYD3HJmWZur4IBReb8uG5qPN+VLH +1xs7EcW6NN6A1pndHEosAFcVIh5kx4gRCsZMsEdGExn4gkTknfBosWo0tROV00UU +UYFqLZfUmJyPDVYZf1fjiLd+yC2qJERNxWWy03JG5UZDLc03ULPlqys+MCT8rRdD +b7p2WGOQBM9whNC5BC6SydFPphwc3yhR1jmMSz+QB18Easo7RV6fmhE462wj1EoH ++IDtJX6JRGguky29ibdolQUiRK3rVowGpIjjgw== +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/mtls/server/server.crt b/test/e2e-v2/cases/simple/mtls/server/server.crt new file mode 100644 index 0000000000..d5d8ded50f --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/server/server.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEkDCCAngCAQEwDQYJKoZIhvcNAQEFBQAwDjEMMAoGA1UEAwwDb2FwMB4XDTIx +MDgyNjAyMzkzNVoXDTIyMDgyNjAyMzkzNVowDjE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HSn6xhcCayyFsqRBZaIf81EaUg2wWr4E5pfyy7jWFMPiG2m/3z8lPGDa38 +cyCdnHz8khmzxMV1qJn4e40YwnWtwZ8xH3S4UNI35RVS4I7IWwEbvnwZ5evYszsS +cxoKZg7vfWuSSqGgZjHqgCI44BsLo9gbT7KtZSnlQKrXd4FlXA3Jjw02qpNr+R8a +Kld25+GtQgsfbAooC9HkTAVsTmAl+pFv/Rm6vVPRYTQJOZE3Y5/hh8E+33odIthd +uw0upy21BSwHukL+Bu8yQSw0kdzy3s/aSuqwyxVsrjZ7xlprmp14Tb2S9NlpnWiO +s2LykpvyO0h9vKa4iQMZidwysm3sb4hzb7NsUnwk+pWev7AE/iQ3DwsV2qYUsfNp +N2pQDjCFe9atqCglt+mkdZfucss= +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/mtls/server/server.pem b/test/e2e-v2/cases/simple/mtls/server/server.pem new file mode 100644 index 0000000000..7284745d36 --- /dev/null +++ b/test/e2e-v2/cases/simple/mtls/server/server.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDRUlR+j+8WYTk3 +xBic4CyrdRSChodT46TAYP5U1B/bexqPN9zr8gChHRCbrNSqB/V3cGNSuGTj5BFk +8LMrOAS8m0Vw/CZUY6naiOHL3Y5QxI8vxLpQBEdnXZUF9nK8LxQroBmG8ikpGgTi +q7NlsigPwUHvN/AAGUm/NQcFCnqQfLtROU08sGUxsOTufkRmnnd8LOXqGlG5nm/c +Q+2rS7vpRvuAagfjQneiY8zBHSDwAIQruKPJdsg4qRCIo9wfBoLZ1BFpTBKF2FJf +d/OyroD9/gqfOGSbRjJFyvcAPfPRR39UFSBI4cjKVCrRcBNtzmqOwqv7TqUqqTa+ +rnrkmHlJ2fBkP43YLI9rx2V3o6Bzd+rs+XjxKKXYm3nLFXas81Nigt5EkqHYTG0B +OSAkYgQbx9TA/ozjaXIok6b9Hil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71en6MiAN+4XDtRQOWhBVJ5fhUtihLQ3ft12DUNUOPtFIyIxiCrs5mOJ2aeNr +fyYHLRNo6RTgeqZQpXpB8kkCi8JhlleeTYffllWGvgGpyB3PhuDwjDwqQ6s3B7d3 +KCSyrVxl93IvR4EE2w1CvvMgQis9SePcWb7RXZCQVkfsriDEEL6wRHdGdNOB32LG +Rs1l/43jxCvxBMzhgKd9NF783V5smX/9m+CSZcH7aWbMVsJ2IOERmJi3uHBY65IS +EQKCAQEAtNQLWatmtdG0qhV8lGXqLruoP81Yrhm5udWtLLh7urIx590JOJ360MZp +8DNJmVDBSpxWONhPbuT2pd74lb1xg2/HsohNXVgVklQCbt+11DbS8Wy0sHpP6pA+ +f6zt40BwheW4qg1dLzPFNqPBetYctvYWWbXXTSzaZi5DxJ9pECVg4YW3AxWBN2q4 +WWbYB+qvXZNJoMaZ9LziRjn9LuDKLpJChE7rpunV6matoVf8eLN5/Arcg2K+Kx85 +J+YJHv0WXgDH0f+wBM/LznjjWvhS509Qjn/l8e/ebZh0zB7eslxor5dHffSwrDoV +iE7e5UrqISr1f6Sd1Rb4l3y30ky0Mg== +-----END PRIVATE KEY----- diff --git a/test/e2e-v2/cases/simple/ssl/ca/ca.crt b/test/e2e-v2/cases/simple/ssl/ca/ca.crt new file mode 100644 index 0000000000..bcac5a94e4 --- /dev/null +++ b/test/e2e-v2/cases/simple/ssl/ca/ca.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEmjCCAoICCQD/tosAx2ZFnDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANv +YXAwIBcNMjAwMzE2MTEwMDI0WhgPMjEyMDAyMjExMTAwMjRaMA4xDDAKBgNVBAMM +A29hcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK7IYIJhJXhhwwzo +ILpbhQJGsK7DnIb0u3AtJd9i0OExC/YBrWiozCkzD4mFIp5GV3Eew5qFjj+TJ+rb +97yd9pBjhkdJRjPNFtb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0NGKSFh29tO +GJi2H6Nd9UrIkTgmsvDPuNTLo+QKrPlx7w2Sr9gW1AmLKZN4k6L52tW20tlQnKBf +PzLwnSu2ZcJWPZEmTmyXzuNz9s/HJXaxHYA3/+RtNlrjSvmH8WbTkO5+wHpJKiJt +Lnd6O6AQ845zucdfiOmi+XpOl+zVdOQ5VudzgO8C85joKTfJ3/G4EKZ1aeNd54vg +ZhYmoomvkl58Tk3upPsdVf5zR5o8efkuuFwn6CxW +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/ssl/certs/ca.crt b/test/e2e-v2/cases/simple/ssl/certs/ca.crt new file mode 100644 index 0000000000..bcac5a94e4 --- /dev/null +++ b/test/e2e-v2/cases/simple/ssl/certs/ca.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEmjCCAoICCQD/tosAx2ZFnDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANv +YXAwIBcNMjAwMzE2MTEwMDI0WhgPMjEyMDAyMjExMTAwMjRaMA4xDDAKBgNVBAMM +A29hcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK7IYIJhJXhhwwzo +ILpbhQJGsK7DnIb0u3AtJd9i0OExC/YBrWiozCkzD4mFIp5GV3Eew5qFjj+TJ+rb +97yd9pBjhkdJRjPNFtbZTvt4cmnQR5RSqztx/n+iaw/9AXkaGgk8Ql5hMGaqoMHJ +7VNne9L5lhA+lW0ZrWOhKvYrx68laRCXdyyYvR5T4xzPPiZDczj9w2jmuVcAVVo4 +tWnr2vCOYBX7I+jnwK7vvHVfSj6eNRTu+FsZQaDIUqzYqNJJLgssulpSaSUOqDPA +GCB4D9E8JtA61KPILLZGhtR6Ov7yyxucIYIleVIv/+QMe9swQAz91fy27rgbr32+ +1kOb6z5UhQkYt93xQ+W/vqoexzoE1TbUz76DQiCRF2vmbUuo5yV1HCW52o+jWbXX +Qvce/SBwXOAhoIUXAsnlmSK6RGL2dIHMYuuHuyKtMPzTjabFt09DZEEA4neHCHuC +oAlXcwW0V9AU5ILCmeKakUftRX766rLibSSD0siml+ePdSmm592bXhwb0e8Q6GaM +7jhyQJ37YlT5uaSLIC0Og0daA3WO0D8qLxCO2DEAiLRU5v35KXRoeY/Qqhl3OLTR +t7ekR4lXHZmstniuYdp/5CKiKwZOIt02uHrfmyLcxdocOBQJBGde+AoP/WwNb+FX +/iOevPiSeRQMl/QN7ClzgojH5EiRAgMBAAEwDQYJKoZIhvcNAQELBQADggIBACi1 +SlaU03ZTYPPk3kOzck+3Wy3eXBP6i33e6I03/Y4wjSyvQyGOKo4nl0kYiMfb9Nb3 +71YbAnlPvDHfhKrCdZcigHQEgJWOe81ThyWjnGZrKAo2DkQYtxMi4ZaidmkDJSfh +LzX/9sM0v+/hdjEF1u4owClCQvHjHiZa9kneYox1enE4d0xGRPPoRh32j7myuA4c +nqAgYZBPU+elNsAKwT5HTfnEj1bd1H9KWRXKmahqAIpg7K7Izn5Qn9WG1a7m9Wvr +FRweRHRmF9ol+C8rvR5uYR6VBj3J3hFsHu5s5ZSQs3YpFHJcByF9nsuOUFu/JsBJ +JVgf5kbeLewEeAmqAES8dKRKjVTZhU9XG84ysHliuwv36BmVEz1XbWCqKUEwceFd +xgsXBe4DXE/XQM5JXpQHr1WzZY5HXuV4/knO+U6xpQaXi9D1V7qaD0NGKSFh29tO +GJi2H6Nd9UrIkTgmsvDPuNTLo+QKrPlx7w2Sr9gW1AmLKZN4k6L52tW20tlQnKBf +PzLwnSu2ZcJWPZEmTmyXzuNz9s/HJXaxHYA3/+RtNlrjSvmH8WbTkO5+wHpJKiJt +Lnd6O6AQ845zucdfiOmi+XpOl+zVdOQ5VudzgO8C85joKTfJ3/G4EKZ1aeNd54vg +ZhYmoomvkl58Tk3upPsdVf5zR5o8efkuuFwn6CxW +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/ssl/certs/server-key.pem b/test/e2e-v2/cases/simple/ssl/certs/server-key.pem new file mode 100644 index 0000000000..a18b8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J5FPfmaYSZbbRveysD0CCeO6/1VnPaarQw1CYxDv0jwOqX4jlw5ZfnLXFa9pmSC +gnyI3CLYvydZrh/sZ+HSEQZhdt/YtQ== +-----END PRIVATE KEY----- diff --git a/test/e2e-v2/cases/simple/ssl/certs/server.crt b/test/e2e-v2/cases/simple/ssl/certs/server.crt new file mode 100644 index 0000000000..82d34dda3a --- /dev/null +++ b/test/e2e-v2/cases/simple/ssl/certs/server.crt @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEkjCCAnoCAQEwDQYJKoZIhvcNAQEFBQAwDjEMMAoGA1UEAwwDb2FwMCAXDTIw +MDMxNjExMDAyNFoYDzIxMjAwMjIxMTEwMDI0WjAOMQwwCgYDVQQDDANvYXAwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/3xn/AbxA4ykJbCnDr39em9Ys +B7CgIuvS+ePNhkOd7R+mDBkXpvORW3vkri9jzW4in60gujFW2la+DhH18eh7ofVv +JstL11ytFJuyNj7NHiymkSHM5MfHKQxiMtzs6CZ4660UvLAjwqFq3AbuV0gQRuAh ++kyK5b+PJtH30ZOyNY57BKQxmu/H1iqt3cqR44PM2atUwReIivRNwclmEpbqH2UV +YCvPdTJhe4bq2yuk1y/COemtvgBAuet5pqq8SoZ+M7iWsQajWSyAfskk4ICbqL0f +AFL28/e8h9K6LCpEn1ayZ7PMMqnurUk1PKSodqX6wkTvp0b4kNaXm5KL5hWHeEb5 +YLj6m8puAC+vw2NcrQGCzZ7YXXpVynPbkJ2kmd06OJ6FL3qLfT7OaZXxzX3hmoSm +Hu1HwP4oNbwKnTn43H8iCc3r2D9R6ax3ib4qYIDXlQHeIT3T7kEokjd9DHX1gGJT +qZ0XF4ByiTYJMyZXkELg7unoZ5zHXr5edbaDlmIXu218qIRDXLOZBbgs+2Pd+N8u +YhmGat+Ca4iT3fq3hqa1MgVgFNLJp1wj2EwAlD2Qyel3AJiuQYhKbWfuNOMYDIHj +6p0zUATI1BjRQKbJrLuWn3SUwyaZgN/FNx9/aELU7UqwlQxE4Xby8lG4qcjwA7st +Mjs5BAQLeZk8k5pc6QIDAQABMA0GCSqGSIb3DQEBBQUAA4ICAQATavjl5MD7cG5Y +R4jiaCkTpqGzTK1gfGLwjBCGItC+uPJ8ftFljYUw9jwdg6rbN8ty4rgLw/1DeILB +ULTqNPGS11OV9EUFITn88wM/QGMroFcpJijVZYd3OwbC56wAMIw4qwKg5NEIIKeK +ThEvtmlrGBJmKfAe8t0fVuA0S2RBt+uPG8+2LsjNxhzfDfX84xJz3ezHImdB+3Lr +4GD9z2l+Mw8io++os4rPbOYMnYsuw6y2CeDCLtfKKf8eyCBYlUmGRm4ILjGToTVv +eHWJQI/WjnJPqtw4haDXDD6DtMPP9wZNGuqvUdBsQPU9DfXPqAhjpuzrsQ27dXMb +CX2p6irLmUHiUjdZ/Com84XxWqfln7+wKE2fI+E//ldNt5djzRkJYftMbi5iQTCy +wNhEupKtm4ph8leAccxYY5JlGFK6jd9UgQ2l6voic9A7i8WEGQ0wHoWpAwKJO9Jb +zJdb9neeWhlWNVztY0ir8vnUNADWj2Y8D5gVCwJT1x0/+Kul9E6n4Rxw0UNsQEk/ +YpJk2no5VvfYPbVITc5Rd3Et4/B+to1zAGH5lL4Tatb15fapoqveskE4ButKmcLq +urzHSFRU18rmq22wB+NT+t0vS8PK90eJhtzB+QUDbcXZleqcmVbwbsVZerOsVZK3 +fuhCEe0ES8CeaIPxHcUyDdt9ybo4/w== +-----END CERTIFICATE----- diff --git a/test/e2e-v2/cases/simple/ssl/docker-compose.yml b/test/e2e-v2/cases/simple/ssl/docker-compose.yml new file mode 100644 index 0000000000..1cc94a6f8c --- /dev/null +++ b/test/e2e-v2/cases/simple/ssl/docker-compose.yml @@ -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. + +version: '2.1' + +services: + oap: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: oap + volumes: + - ./certs:/skywalking/certs + environment: + 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 + ports: + - 12800 + + provider: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: provider + volumes: + - ./ca:/skywalking/agent/ca + ports: + - 9090 + depends_on: + oap: + condition: service_healthy + + consumer: + extends: + file: ../../../script/docker-compose/base-compose.yml + service: consumer + volumes: + - ./ca:/skywalking/agent/ca + ports: + - 9092 + depends_on: + provider: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e-v2/cases/simple/ssl/e2e.yaml b/test/e2e-v2/cases/simple/ssl/e2e.yaml new file mode 100644 index 0000000000..e8473d3ce8 --- /dev/null +++ b/test/e2e-v2/cases/simple/ssl/e2e.yaml @@ -0,0 +1,75 @@ +# 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: 1200 + init-system-environment: ../../../script/env + steps: + - 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 + - name: install etcdctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl + +cleanup: + on: always + +trigger: + action: http + interval: 10s + times: 10 + url: http://${consumer_host}:${consumer_9092}/info + method: POST + +verify: + # verify with retry strategy + retry: + # max retry count + count: 20 + # the interval between two retries, in millisecond. + interval: 10000 + cases: + # service list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls + expected: ../expected/service.yml + # service metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # service endpoint + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/service-endpoint.yml + # service endpoint metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' - + expected: ../expected/metrics-has-value.yml + # dependency service + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) + expected: ../expected/dependency-services.yml + # service instance list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider + expected: ../expected/service-instance.yml + + # dependency instance + + # trace segment list + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls + expected: ../expected/traces-list.yml + # trace detail + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}') + expected: ../expected/trace-info-detail.yml \ No newline at end of file