You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/10/12 02:26:51 UTC
[skywalking] branch master updated: Replace e2e cases to e2e-v2:
Gateway (#7908)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 52fc942 Replace e2e cases to e2e-v2: Gateway (#7908)
52fc942 is described below
commit 52fc942aa056ce66d346386f06d2d3e09d3ed243
Author: wankai123 <wa...@foxmail.com>
AuthorDate: Tue Oct 12 10:26:35 2021 +0800
Replace e2e cases to e2e-v2: Gateway (#7908)
---
.github/workflows/e2e.yaml | 4 +-
CHANGES.md | 1 +
test/e2e-v2/cases/gateway/docker-compose.yml | 144 +++++++++++++++++++++
test/e2e-v2/cases/gateway/e2e.yaml | 115 ++++++++++++++++
.../cases/gateway/expected/dependency-endpoint.yml | 40 ++++++
.../cases/gateway/expected/dependency-instance.yml | 53 ++++++++
.../expected/dependency-services-consumer.yml | 47 +++++++
.../expected/dependency-services-provider.yml | 47 +++++++
.../expected/metrics-has-value-percentile.yml | 47 +++++++
.../cases/gateway/expected/metrics-has-value.yml | 19 +++
.../gateway/expected/service-endpoint-consumer.yml | 19 +++
.../gateway/expected/service-endpoint-provider.yml | 19 +++
.../gateway/expected/service-instance-consumer.yml | 40 ++++++
.../gateway/expected/service-instance-provider.yml | 61 +++++++++
test/e2e-v2/cases/gateway/expected/service.yml | 23 ++++
test/e2e-v2/cases/gateway/expected/traces-list.yml | 27 ++++
test/e2e-v2/cases/gateway/gateway.conf | 25 ++++
test/e2e-v2/cases/gateway/gateways.yml | 20 +++
18 files changed, 749 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index 15f6188..37511d9 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -49,6 +49,8 @@ jobs:
config-file: simple/mtls/e2e.yaml
- name: Lua Nginx
config-file: lua/e2e.yaml
+ - name: Gateway
+ config-file: gateway/e2e.yaml
steps:
- uses: actions/checkout@v2
with:
@@ -69,8 +71,6 @@ jobs:
strategy:
matrix:
case:
- - name: Gateway
- class: org.apache.skywalking.e2e.GatewayE2E
- name: Meter
class: org.apache.skywalking.e2e.meter.MeterE2E
- name: Zabbix
diff --git a/CHANGES.md b/CHANGES.md
index d671d8a..c9860af 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -12,6 +12,7 @@ Release Notes.
* Upgrade Armeria to 1.12, upgrade OpenSearch test version to 1.1.0.
* Add component definition for `Apache-Kylin`.
* Enhance `get` generation mechanism of OAL engine, support map type of source's field.
+* Replace e2e cases to e2e-v2: Gateway.
#### UI
* Optimize endpoint dependency.
diff --git a/test/e2e-v2/cases/gateway/docker-compose.yml b/test/e2e-v2/cases/gateway/docker-compose.yml
new file mode 100644
index 0000000..c432971
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/docker-compose.yml
@@ -0,0 +1,144 @@
+# 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:
+ zk:
+ image: zookeeper:3.5
+ expose:
+ - 2181
+ networks:
+ - e2e
+ healthcheck:
+ test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/2181"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ es:
+ image: elastic/elasticsearch:6.3.2
+ expose:
+ - 9200
+ networks:
+ - e2e
+ environment:
+ - discovery.type=single-node
+ - cluster.routing.allocation.disk.threshold_enabled=false
+ healthcheck:
+ test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9200"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ oap1:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: oap
+ environment:
+ SW_CLUSTER: zookeeper
+ SW_STORAGE: elasticsearch
+ volumes:
+ - ./gateways.yml:/skywalking/config/gateways.yml
+ depends_on:
+ zk:
+ condition: service_healthy
+ es:
+ condition: service_healthy
+
+ oap2:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: oap
+ environment:
+ SW_CLUSTER: zookeeper
+ SW_STORAGE: elasticsearch
+ volumes:
+ - ./gateways.yml:/skywalking/config/gateways.yml
+ depends_on:
+ zk:
+ condition: service_healthy
+ es:
+ condition: service_healthy
+ oap1:
+ condition: service_healthy
+
+ ui:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: ui
+ environment:
+ - SW_OAP_ADDRESS=http://oap1:12800,http://oap2:12800
+ depends_on:
+ oap1:
+ condition: service_healthy
+ oap2:
+ condition: service_healthy
+ ports:
+ - 8080
+
+ provider1:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: provider
+ environment:
+ SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap1:11800
+ SW_AGENT_INSTANCE_NAME: provider1
+ depends_on:
+ oap1:
+ condition: service_healthy
+
+ provider2:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: provider
+ environment:
+ SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap2:11800
+ SW_AGENT_INSTANCE_NAME: provider2
+ depends_on:
+ oap2:
+ condition: service_healthy
+
+ consumer:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: consumer
+ environment:
+ SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap1:11800
+ SW_AGENT_NAME: e2e-service-consumer
+ PROVIDER_URL: http://gateway
+ depends_on:
+ oap1:
+ condition: service_healthy
+ ports:
+ - 9092
+
+ gateway:
+ image: nginx:1.13.12
+ expose:
+ - 80
+ networks:
+ - e2e
+ volumes:
+ - ./gateway.conf:/etc/nginx/conf.d/api.conf:ro
+ depends_on:
+ provider1:
+ condition: service_healthy
+ provider2:
+ condition: service_healthy
+ restart: on-failure
+
+networks:
+ e2e:
diff --git a/test/e2e-v2/cases/gateway/e2e.yaml b/test/e2e-v2/cases/gateway/e2e.yaml
new file mode 100644
index 0000000..0b3c73c
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/e2e.yaml
@@ -0,0 +1,115 @@
+# 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
+
+trigger:
+ action: http
+ interval: 3s
+ times: 10
+ url: http://${consumer_host}:${consumer_9092}/users
+ method: POST
+ body: '{"id":"123","name":"skywalking"}'
+ headers:
+ "Content-Type": "application/json"
+
+verify:
+ # verify with retry strategy
+ retry:
+ # max retry count
+ count: 20
+ # the interval between two retries, in millisecond.
+ interval: 3s
+ cases:
+ # service list
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql service ls
+ expected: expected/service.yml
+ # service instance list
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql instance list --service-name=e2e-service-provider
+ expected: expected/service-instance-provider.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql instance list --service-name=e2e-service-consumer
+ expected: expected/service-instance-consumer.yml
+ # service endpoint
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
+ expected: expected/service-endpoint-provider.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql endpoint list --keyword=users --service-name=e2e-service-consumer
+ expected: expected/service-endpoint-consumer.yml
+ # trace segment list
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql trace ls
+ expected: expected/traces-list.yml
+ # dependency service
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql dependency service --service-name=e2e-service-consumer
+ expected: expected/dependency-services-consumer.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql dependency service --service-name=e2e-service-provider
+ expected: expected/dependency-services-provider.yml
+ # dependency instance gateway:80 is not real then use service-id
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql dependency instance --service-id=Z2F0ZXdheTo4MA==.0 --dest-service-name=e2e-service-provider
+ expected: expected/dependency-instance.yml
+ # service metrics linear
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_sla --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_cpm --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_resp_time --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_apdex --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service metrics percentile
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics multiple-linear --name=service_percentile --service-name=e2e-service-provider |yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
+ expected: expected/metrics-has-value-percentile.yml
+ # service instance metrics
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_instance_resp_time --instance-name=provider1 --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_instance_cpm --instance-name=provider1 --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_instance_sla --instance-name=provider1 --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service endpoint metrics
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=endpoint_avg --endpoint-name=POST:/users --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=endpoint_sla --endpoint-name=POST:/users --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service endpoint metrics percentile
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics multiple-linear --name=endpoint_percentile --endpoint-name=POST:/users --service-name=e2e-service-provider |yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
+ expected: expected/metrics-has-value-percentile.yml
+ # service relation metrics
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_relation_client_cpm --service-name=e2e-service-consumer --dest-service-id=Z2F0ZXdheTo4MA==.0 |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_relation_server_cpm --service-id=VXNlcg==.0 --dest-service-name=e2e-service-consumer |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_relation_client_cpm --service-name=e2e-service-provider --dest-service-id=bG9jYWxob3N0Oi0x.0 |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_relation_server_cpm --service-id=Z2F0ZXdheTo4MA==.0 --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service instance relation metrics gateway:80 is not real then use service-id
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_instance_relation_server_cpm --instance-id=Z2F0ZXdheTo4MA==.0_Z2F0ZXdheTo4MA== --service-id=Z2F0ZXdheTo4MA==.0 --dest-instance-name=provider1 --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${ui_host}:${ui_8080}/graphql metrics linear --name=service_instance_relation_server_cpm --instance-id=Z2F0ZXdheTo4MA==.0_Z2F0ZXdheTo4MA== --service-id=Z2F0ZXdheTo4MA==.0 --dest-instance-name=provider2 --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-endpoint.yml b/test/e2e-v2/cases/gateway/expected/dependency-endpoint.yml
new file mode 100644
index 0000000..3835336
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/dependency-endpoint.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.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "POST:/users" }}
+ name: POST:/users
+ serviceid: {{ b64enc "e2e-service-consumer" }}.1
+ servicename: e2e-service-consumer
+ type: ""
+ isreal: true
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
+ name: POST:/users
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: e2e-service-provider
+ type: ""
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "POST:/users" }}
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-consumer" }}.1-{{ b64enc "POST:/users" }}-{{ b64enc "e2e-service-provider" }}.1-{{ b64enc "POST:/users" }}
+ detectpoints:
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-instance.yml b/test/e2e-v2/cases/gateway/expected/dependency-instance.yml
new file mode 100644
index 0000000..ec55a86
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/dependency-instance.yml
@@ -0,0 +1,53 @@
+# 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:
+{{- contains .nodes }}
+- id: {{ b64enc "gateway:80" }}.0_{{ b64enc "gateway:80" }}
+ name: gateway:80
+ serviceid: {{ b64enc "gateway:80" }}.0
+ servicename: gateway:80
+ type: ""
+ isreal: false
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: provider1
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: e2e-service-provider
+ type: "Tomcat"
+ isreal: true
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider2" }}
+ name: provider2
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: e2e-service-provider
+ type: "Tomcat"
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "gateway:80" }}.0_{{ b64enc "gateway:80" }}
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ targetcomponents: []
+ id: {{ b64enc "gateway:80" }}.0_{{ b64enc "gateway:80" }}-{{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ detectpoints:
+ - SERVER
+- source: {{ b64enc "gateway:80" }}.0_{{ b64enc "gateway:80" }}
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider2" }}
+ targetcomponents: []
+ id: {{ b64enc "gateway:80" }}.0_{{ b64enc "gateway:80" }}-{{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider2" }}
+ detectpoints:
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml b/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml
new file mode 100644
index 0000000..851303f
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml
@@ -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.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "User" }}.0
+ name: User
+ type: USER
+ isreal: false
+- id: {{ b64enc "e2e-service-consumer" }}.1
+ name: e2e-service-consumer
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "gateway:80" }}.0
+ name: gateway:80
+ type: SpringRestTemplate
+ isreal: false
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e-service-consumer" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "gateway:80" }}.0
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-consumer" }}.1-{{ b64enc "gateway:80" }}.0
+ detectpoints:
+ - CLIENT
+- source: {{ b64enc "User" }}.0
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-consumer" }}.1
+ targetcomponents: []
+ id: {{ b64enc "User" }}.0-{{ b64enc "e2e-service-consumer" }}.1
+ detectpoints:
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml b/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml
new file mode 100644
index 0000000..941adbe
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml
@@ -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.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "gateway:80" }}.0
+ name: gateway:80
+ type: Tomcat
+ isreal: false
+- id: {{ b64enc "localhost:-1" }}.0
+ name: localhost:-1
+ type: H2
+ isreal: false
+{{- end }}
+calls:
+{{- contains .calls }}
+- 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
+- source: {{ b64enc "gateway:80"}}.0
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1
+ targetcomponents: []
+ id: {{ b64enc "gateway:80" }}.0-{{ b64enc "e2e-service-provider" }}.1
+ detectpoints:
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/metrics-has-value-percentile.yml b/test/e2e-v2/cases/gateway/expected/metrics-has-value-percentile.yml
new file mode 100644
index 0000000..ef17490
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/metrics-has-value-percentile.yml
@@ -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.
+
+{{- contains . }}
+- key: 0
+ value:
+ {{- contains .value }}
+ - key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+ {{- end }}
+- key: 1
+ value:
+ {{- contains .value }}
+ - key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+ {{- end }}
+- key: 2
+ value:
+ {{- contains .value }}
+ - key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+ {{- end }}
+- key: 3
+ value:
+ {{- contains .value }}
+ - key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+ {{- end }}
+- key: 4
+ value:
+ {{- contains .value }}
+ - key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+ {{- end }}
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/metrics-has-value.yml b/test/e2e-v2/cases/gateway/expected/metrics-has-value.yml
new file mode 100644
index 0000000..5359e6d
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/metrics-has-value.yml
@@ -0,0 +1,19 @@
+# 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 1 }}
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/service-endpoint-consumer.yml b/test/e2e-v2/cases/gateway/expected/service-endpoint-consumer.yml
new file mode 100644
index 0000000..cedf79a
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/service-endpoint-consumer.yml
@@ -0,0 +1,19 @@
+# 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 . }}
+- id: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "POST:/users" }}
+ name: POST:/users
+{{- end}}
diff --git a/test/e2e-v2/cases/gateway/expected/service-endpoint-provider.yml b/test/e2e-v2/cases/gateway/expected/service-endpoint-provider.yml
new file mode 100644
index 0000000..0303f51
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/service-endpoint-provider.yml
@@ -0,0 +1,19 @@
+# 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 . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
+ name: POST:/users
+{{- end}}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/gateway/expected/service-instance-consumer.yml b/test/e2e-v2/cases/gateway/expected/service-instance-consumer.yml
new file mode 100644
index 0000000..7d1d199
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/service-instance-consumer.yml
@@ -0,0 +1,40 @@
+# 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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "consumer1" }}
+ name: consumer1
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: Linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: "1"
+ - name: Start Time
+ value: {{ notEmpty .value }}
+ - name: JVM Arguments
+ value: '{{ notEmpty .value }}'
+ - name: Jar Dependencies
+ value: '{{ notEmpty .value }}'
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: JAVA
+ instanceuuid: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "consumer1" }}
+{{- end}}
diff --git a/test/e2e-v2/cases/gateway/expected/service-instance-provider.yml b/test/e2e-v2/cases/gateway/expected/service-instance-provider.yml
new file mode 100644
index 0000000..a4cbe2c
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/service-instance-provider.yml
@@ -0,0 +1,61 @@
+# 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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: provider1
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: Linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: "1"
+ - name: Start Time
+ value: {{ notEmpty .value }}
+ - name: JVM Arguments
+ value: '{{ notEmpty .value }}'
+ - name: Jar Dependencies
+ value: '{{ notEmpty .value }}'
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: JAVA
+ instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider2" }}
+ name: provider2
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: Linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: "1"
+ - name: Start Time
+ value: {{ notEmpty .value }}
+ - name: JVM Arguments
+ value: '{{ notEmpty .value }}'
+ - name: Jar Dependencies
+ value: '{{ notEmpty .value }}'
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: JAVA
+ instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider2" }}
+{{- end}}
diff --git a/test/e2e-v2/cases/gateway/expected/service.yml b/test/e2e-v2/cases/gateway/expected/service.yml
new file mode 100644
index 0000000..20e26bc
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/service.yml
@@ -0,0 +1,23 @@
+# 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 . }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ group: ""
+- id: {{ b64enc "e2e-service-consumer" }}.1
+ name: e2e-service-consumer
+ group: ""
+{{- end }}
diff --git a/test/e2e-v2/cases/gateway/expected/traces-list.yml b/test/e2e-v2/cases/gateway/expected/traces-list.yml
new file mode 100644
index 0000000..876508f
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/expected/traces-list.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.
+
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - POST:/users
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ index .traceids 0 }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/gateway/gateway.conf b/test/e2e-v2/cases/gateway/gateway.conf
new file mode 100644
index 0000000..a096caa
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/gateway.conf
@@ -0,0 +1,25 @@
+# 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.
+
+upstream app {
+ server provider1:9090;
+ server provider2:9090;
+}
+
+server {
+ location / {
+ proxy_pass http://app$request_uri;
+ }
+}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/gateway/gateways.yml b/test/e2e-v2/cases/gateway/gateways.yml
new file mode 100755
index 0000000..dacfbcb
--- /dev/null
+++ b/test/e2e-v2/cases/gateway/gateways.yml
@@ -0,0 +1,20 @@
+# 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.
+
+gateways:
+ - name: proxy0
+ instances:
+ - host: gateway # the host/ip of this gateway instance
+ port: 80 # the port of this gateway instance, defaults to 80