You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wa...@apache.org on 2021/10/14 13:51:19 UTC
[skywalking] branch master updated: Replace e2e cases to e2e-v2:
go2sky (#7929)
This is an automated email from the ASF dual-hosted git repository.
wankai 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 bafc3cd Replace e2e cases to e2e-v2: go2sky (#7929)
bafc3cd is described below
commit bafc3cde9d98f777725ae7a604d4a422ce90752e
Author: wankai123 <wa...@foxmail.com>
AuthorDate: Thu Oct 14 21:50:37 2021 +0800
Replace e2e cases to e2e-v2: go2sky (#7929)
---
.github/workflows/e2e.go.yaml | 4 +-
CHANGES.md | 1 +
test/e2e-v2/{script/env => cases/go/Dockerfile.go} | 26 +++-
test/e2e-v2/cases/go/docker-compose.yml | 71 ++++++++++
test/e2e-v2/cases/go/e2e.yaml | 111 ++++++++++++++++
.../go/expected/dependency-instance-go.yml} | 32 ++++-
.../cases/go/expected/dependency-services-go.yml | 49 +++++++
.../go/expected/metrics-has-value.yml} | 10 +-
.../go/expected/service-endpoint-consumer.yml} | 10 +-
.../go/expected/service-endpoint-go.yml} | 10 +-
.../go/expected/service-endpoint-provider.yml} | 10 +-
.../cases/go/expected/service-instance-go.yml | 34 +++++
.../go/expected/service-instance-provider.yml | 40 ++++++
.../{script/env => cases/go/expected/service.yml} | 17 ++-
.../cases/go/expected/trace-correlation-detail.yml | 147 +++++++++++++++++++++
.../go/expected/traces-list-consumer.yml} | 18 ++-
.../env => cases/go/expected/traces-list-go.yml} | 18 ++-
.../go/expected/traces-list-provider.yml} | 18 ++-
test/e2e-v2/script/env | 1 +
19 files changed, 566 insertions(+), 61 deletions(-)
diff --git a/.github/workflows/e2e.go.yaml b/.github/workflows/e2e.go.yaml
index c594d03..883246e 100644
--- a/.github/workflows/e2e.go.yaml
+++ b/.github/workflows/e2e.go.yaml
@@ -45,6 +45,6 @@ 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.GOE2E
+ config-file: go/e2e.yaml
diff --git a/CHANGES.md b/CHANGES.md
index aea0167..8cb1e16 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -32,6 +32,7 @@ Release Notes.
* Add `Message Queue Avg Consuming Latency` metric for MQ consuming service and endpoint.
* Replace e2e cases to e2e-v2: PHP.
* Replace VM e2e cases to e2e-v2: Prometheus Node Exporter, Zabbix.
+* Replace e2e cases to e2e-v2: go2sky.
#### UI
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/Dockerfile.go
similarity index 62%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/Dockerfile.go
index 7d70249..24e30ab 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/Dockerfile.go
@@ -13,9 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
+FROM golang:1.13 AS builder
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+ARG SW_AGENT_GO_COMMIT
+ARG GO2SKY_CODE=${SW_AGENT_GO_COMMIT}.tar.gz
+ARG GO2SKY_CODE_URL=https://github.com/SkyAPM/go2sky/archive/${GO2SKY_CODE}
+
+ENV CGO_ENABLED=0
+ENV GO111MODULE=on
+
+WORKDIR /go2sky
+
+ADD ${GO2SKY_CODE_URL} .
+RUN tar -xf ${GO2SKY_CODE} --strip 1
+RUN rm ${GO2SKY_CODE}
+
+WORKDIR /go2sky/test/e2e/example-server
+RUN go build -o main
+
+FROM alpine:3.10
+
+COPY --from=builder /go2sky/test/e2e/example-server/main .
+ENTRYPOINT ["/main"]
diff --git a/test/e2e-v2/cases/go/docker-compose.yml b/test/e2e-v2/cases/go/docker-compose.yml
new file mode 100644
index 0000000..f5ed188
--- /dev/null
+++ b/test/e2e-v2/cases/go/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
+ ports:
+ - 12800
+
+ provider:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: provider
+ depends_on:
+ oap:
+ condition: service_healthy
+
+ go2sky:
+ build:
+ context: .
+ dockerfile: Dockerfile.go
+ args:
+ - SW_AGENT_GO_COMMIT=${SW_AGENT_GO_COMMIT}
+ networks:
+ - e2e
+ expose:
+ - 8080
+ depends_on:
+ oap:
+ condition: service_healthy
+ provider:
+ condition: service_healthy
+ command: ['--grpc', '--oap-server', 'oap:11800', '--upstream-url', 'http://provider:9090/correlation']
+ healthcheck:
+ test: ["CMD", "sh", "-c", "nc -z 127.0.0.1 8080"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ consumer:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: consumer
+ environment:
+ PROVIDER_URL: http://go2sky:8080
+ depends_on:
+ oap:
+ condition: service_healthy
+ go2sky:
+ condition: service_healthy
+ ports:
+ - 9092
+
+networks:
+ e2e:
diff --git a/test/e2e-v2/cases/go/e2e.yaml b/test/e2e-v2/cases/go/e2e.yaml
new file mode 100644
index 0000000..31c931b
--- /dev/null
+++ b/test/e2e-v2/cases/go/e2e.yaml
@@ -0,0 +1,111 @@
+# 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}/correlation
+ method: POST
+
+verify:
+ retry:
+ count: 20
+ interval: 3s
+ cases:
+ # service list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
+ expected: expected/service.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-provider.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=go2sky
+ expected: expected/service-instance-go.yml
+ # service endpoint
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=correlation --service-name=go2sky
+ expected: expected/service-endpoint-go.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=correlation --service-name=e2e-service-consumer
+ expected: expected/service-endpoint-consumer.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=correlation --service-name=e2e-service-provider
+ expected: expected/service-endpoint-provider.yml
+ # trace segment list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=go2sky
+ expected: expected/traces-list-go.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=e2e-service-consumer
+ expected: expected/traces-list-consumer.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=e2e-service-provider
+ expected: expected/traces-list-provider.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 \
+ | yq e '.traces | select(.[].endpointnames[0]=="POST:/correlation") | .[0].traceids[0]' -
+ )
+ expected: expected/trace-correlation-detail.yml
+ # dependency service
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=go2sky
+ expected: expected/dependency-services-go.yml
+ # dependency instance
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency instance --service-name=go2sky --dest-service-name=e2e-service-provider
+ expected: expected/dependency-instance-go.yml
+ # service metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_sla --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_cpm --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_resp_time --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_apdex --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service instance metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/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://${oap_host}:${oap_12800}/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://${oap_host}:${oap_12800}/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://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_cpm --endpoint-name=/POST/correlation --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_avg --endpoint-name=/POST/correlation --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_sla --endpoint-name=/POST/correlation --service-name=go2sky |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service relation metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_client_cpm --service-name=go2sky --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_server_cpm --service-name=go2sky --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service instance relation metrics
+ - query: |
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_relation_client_cpm --instance-name=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=go2sky | yq e '.[0].name' - ) \
+ --service-name=go2sky --dest-instance-name=provider1 --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/dependency-instance-go.yml
similarity index 54%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/dependency-instance-go.yml
index 7d70249..b115dba 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/dependency-instance-go.yml
@@ -13,9 +13,29 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+nodes:
+{{- contains .nodes }}
+- id: {{ notEmpty .id }}
+ name: {{ notEmpty .name }}
+ serviceid: {{ b64enc "go2sky" }}.1
+ servicename: go2sky
+ type: ""
+ isreal: true
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: provider1
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: e2e-service-provider
+ type: Tomcat
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ notEmpty .source }}
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ targetcomponents: []
+ id: {{ notEmpty .id }}
+ detectpoints:
+ - CLIENT
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/go/expected/dependency-services-go.yml b/test/e2e-v2/cases/go/expected/dependency-services-go.yml
new file mode 100644
index 0000000..19d30ba
--- /dev/null
+++ b/test/e2e-v2/cases/go/expected/dependency-services-go.yml
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e-service-provider"}}.1
+ name: e2e-service-provider
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "e2e-service-consumer"}}.1
+ name: e2e-service-consumer
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "go2sky" }}.1
+ name: go2sky
+ type: GoHttpServer
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e-service-consumer"}}.1
+ sourcecomponents: []
+ target: {{ b64enc "go2sky"}}.1
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-consumer"}}.1-{{ b64enc "go2sky"}}.1
+ detectpoints:
+ - CLIENT
+ - SERVER
+- source: {{ b64enc "go2sky" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider"}}.1
+ targetcomponents: []
+ id: {{ b64enc "go2sky" }}.1-{{ b64enc "e2e-service-provider"}}.1
+ detectpoints:
+ - CLIENT
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/metrics-has-value.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/metrics-has-value.yml
index 7d70249..5359e6d 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/metrics-has-value.yml
@@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+{{- contains . }}
+- key: {{ notEmpty .key }}
+ value: {{ ge .value 1 }}
+{{- end }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/service-endpoint-consumer.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/service-endpoint-consumer.yml
index 7d70249..f2aa5cf 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/service-endpoint-consumer.yml
@@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+{{- contains . }}
+- id: {{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "POST:/correlation" }}
+ name: POST:/correlation
+{{- end}}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/service-endpoint-go.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/service-endpoint-go.yml
index 7d70249..de9a9ba 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/service-endpoint-go.yml
@@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+{{- contains . }}
+- id: {{ b64enc "go2sky" }}.1_{{ b64enc "/POST/correlation" }}
+ name: /POST/correlation
+{{- end}}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/service-endpoint-provider.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/service-endpoint-provider.yml
index 7d70249..19c471f 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/service-endpoint-provider.yml
@@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/correlation" }}
+ name: POST:/correlation
+{{- end}}
diff --git a/test/e2e-v2/cases/go/expected/service-instance-go.yml b/test/e2e-v2/cases/go/expected/service-instance-go.yml
new file mode 100644
index 0000000..07aa13b
--- /dev/null
+++ b/test/e2e-v2/cases/go/expected/service-instance-go.yml
@@ -0,0 +1,34 @@
+# 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. shadow
+
+{{- contains .}}
+- id: {{ notEmpty .id }}
+ name: {{ notEmpty .name }}
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: {{ notEmpty .value }}
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: GO
+ instanceuuid: {{ notEmpty .instanceuuid }}
+{{- end}}
diff --git a/test/e2e-v2/cases/go/expected/service-instance-provider.yml b/test/e2e-v2/cases/go/expected/service-instance-provider.yml
new file mode 100644
index 0000000..f9296e4
--- /dev/null
+++ b/test/e2e-v2/cases/go/expected/service-instance-provider.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-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" }}
+{{- end}}
\ No newline at end of file
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/service.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/service.yml
index 7d70249..38b4a60 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/service.yml
@@ -13,9 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ group: ""
+- id: {{ b64enc "e2e-service-consumer" }}.1
+ name: e2e-service-consumer
+ group: ""
+- id: {{ b64enc "go2sky" }}.1
+ name: go2sky
+ group: ""
+{{- end }}
diff --git a/test/e2e-v2/cases/go/expected/trace-correlation-detail.yml b/test/e2e-v2/cases/go/expected/trace-correlation-detail.yml
new file mode 100644
index 0000000..40b090d
--- /dev/null
+++ b/test/e2e-v2/cases/go/expected/trace-correlation-detail.yml
@@ -0,0 +1,147 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+spans:
+ {{- contains .spans }}
+ - traceid: {{ .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: e2e-service-consumer
+ serviceinstancename: consumer1
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: POST:/correlation
+ type: Entry
+ peer: ""
+ component: Tomcat
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: e2e-service-consumer
+ serviceinstancename: consumer1
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: /correlation
+ type: Exit
+ peer: go2sky:8080
+ component: SpringRestTemplate
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: http://go2sky:8080/correlation
+ - key: http.method
+ value: POST
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs:
+ {{- contains .refs }}
+ - traceid: {{ notEmpty .traceid }}
+ parentsegmentid: {{ .parentsegmentid }}
+ parentspanid: 1
+ type: CROSS_PROCESS
+ {{- end }}
+ servicecode: go2sky
+ serviceinstancename: {{ notEmpty .serviceinstancename }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: /POST/correlation
+ type: Entry
+ peer: ""
+ component: GoHttpServer
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: go2sky:8080/correlation
+ - key: http.method
+ value: POST
+ - key: status_code
+ value: "200"
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: go2sky
+ serviceinstancename: {{ notEmpty .serviceinstancename }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: /POST/correlation
+ type: Exit
+ peer: provider:9090
+ component: GoHttpClient
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: http://provider:9090/correlation
+ - key: http.method
+ value: POST
+ - key: status_code
+ value: "200"
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs:
+ {{- contains .refs }}
+ - traceid: {{ notEmpty .traceid }}
+ parentsegmentid: {{ .parentsegmentid }}
+ parentspanid: 1
+ type: CROSS_PROCESS
+ {{- end }}
+ servicecode: e2e-service-provider
+ serviceinstancename: provider1
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: POST:/correlation
+ type: Entry
+ peer: ""
+ component: Tomcat
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: http://provider:9090/correlation
+ - key: http.method
+ value: POST
+ {{- end }}
+ logs: []
+ {{- end }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/traces-list-consumer.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/traces-list-consumer.yml
index 7d70249..8cdf044 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/traces-list-consumer.yml
@@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - POST:/correlation
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/traces-list-go.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/traces-list-go.yml
index 7d70249..7b5cd0f 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/traces-list-go.yml
@@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - /POST/correlation
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/cases/go/expected/traces-list-provider.yml
similarity index 71%
copy from test/e2e-v2/script/env
copy to test/e2e-v2/cases/go/expected/traces-list-provider.yml
index 7d70249..8cdf044 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/cases/go/expected/traces-list-provider.yml
@@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
-SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
-
-SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - POST:/correlation
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/script/env
index 7d70249..6f9f924 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/script/env
@@ -17,5 +17,6 @@ SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
+SW_AGENT_GO_COMMIT=4af380c2db6243106b0fc650b6003ce3b3eb82a0
SW_CTL_COMMIT=b90255132f916f53eb90955cc8a6445b03a4bec3