Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
f4c99db4
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
f4c99db4
编写于
10月 13, 2021
作者:
W
wankai123
提交者:
GitHub
10月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace e2e cases to e2e-v2: Nodejs (#7914)
上级
720dc924
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
664 addition
and
3 deletion
+664
-3
.github/workflows/e2e.nodejs.yaml
.github/workflows/e2e.nodejs.yaml
+2
-2
CHANGES.md
CHANGES.md
+1
-0
test/e2e-v2/cases/meter/docker-compose.yml
test/e2e-v2/cases/meter/docker-compose.yml
+2
-0
test/e2e-v2/cases/nodejs/Dockerfile.nodejs
test/e2e-v2/cases/nodejs/Dockerfile.nodejs
+30
-0
test/e2e-v2/cases/nodejs/consumer.ts
test/e2e-v2/cases/nodejs/consumer.ts
+40
-0
test/e2e-v2/cases/nodejs/docker-compose.yml
test/e2e-v2/cases/nodejs/docker-compose.yml
+92
-0
test/e2e-v2/cases/nodejs/e2e.yaml
test/e2e-v2/cases/nodejs/e2e.yaml
+111
-0
test/e2e-v2/cases/nodejs/expected/dependency-instance.yml
test/e2e-v2/cases/nodejs/expected/dependency-instance.yml
+41
-0
test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml
...s/nodejs/expected/dependency-services-consumer-nodejs.yml
+48
-0
test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml
...v2/cases/nodejs/expected/dependency-services-consumer.yml
+49
-0
test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml
...s/nodejs/expected/dependency-services-provider-nodejs.yml
+37
-0
test/e2e-v2/cases/nodejs/expected/metrics-has-value.yml
test/e2e-v2/cases/nodejs/expected/metrics-has-value.yml
+19
-0
test/e2e-v2/cases/nodejs/expected/service-endpoint-consumer-nodejs.yml
...ases/nodejs/expected/service-endpoint-consumer-nodejs.yml
+19
-0
test/e2e-v2/cases/nodejs/expected/service-endpoint-provider-nodejs.yml
...ases/nodejs/expected/service-endpoint-provider-nodejs.yml
+19
-0
test/e2e-v2/cases/nodejs/expected/service-instance-consumer-nodejs.yml
...ases/nodejs/expected/service-instance-consumer-nodejs.yml
+32
-0
test/e2e-v2/cases/nodejs/expected/service-instance-provider-nodejs.yml
...ases/nodejs/expected/service-instance-provider-nodejs.yml
+32
-0
test/e2e-v2/cases/nodejs/expected/service.yml
test/e2e-v2/cases/nodejs/expected/service.yml
+26
-0
test/e2e-v2/cases/nodejs/expected/traces-list.yml
test/e2e-v2/cases/nodejs/expected/traces-list.yml
+27
-0
test/e2e-v2/cases/nodejs/provider.ts
test/e2e-v2/cases/nodejs/provider.ts
+35
-0
test/e2e-v2/script/env
test/e2e-v2/script/env
+2
-1
未找到文件。
.github/workflows/e2e.nodejs.yaml
浏览文件 @
f4c99db4
...
...
@@ -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.NodeJSE2E
config-file
:
nodejs/e2e.yaml
CHANGES.md
浏览文件 @
f4c99db4
...
...
@@ -26,6 +26,7 @@ Release Notes.
attribute expression.
*
Refactor the OAL compiler context to improve readability.
*
Fix wrong generated codes of
`hashCode`
and
`remoteHashCode`
methods for numeric fields.
*
Replace e2e cases to e2e-v2: Nodejs.
#### UI
...
...
test/e2e-v2/cases/meter/docker-compose.yml
浏览文件 @
f4c99db4
...
...
@@ -29,6 +29,8 @@ services:
extends
:
file
:
../../script/docker-compose/base-compose.yml
service
:
provider
environment
:
SW_METER_REPORT_INTERVAL
:
5
depends_on
:
oap
:
condition
:
service_healthy
...
...
test/e2e-v2/cases/nodejs/Dockerfile.nodejs
0 → 100644
浏览文件 @
f4c99db4
# 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.
FROM node:12
ARG SW_AGENT_NODEJS_COMMIT
WORKDIR /app
EXPOSE 5050 5051
RUN git clone https://github.com/apache/skywalking-nodejs.git $(pwd)
RUN git reset --hard ${SW_AGENT_NODEJS_COMMIT} && git submodule update --init
RUN npm install
RUN npm run generate-source
RUN npm install express axios
test/e2e-v2/cases/nodejs/consumer.ts
0 → 100644
浏览文件 @
f4c99db4
/*!
*
* 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.
*
*/
import
*
as
http
from
'
http
'
;
import
agent
from
'
./src
'
;
import
axios
from
'
axios
'
;
agent
.
start
({
serviceName
:
'
consumer
'
,
maxBufferSize
:
1000
,
});
const
server
=
http
.
createServer
((
req
,
res
)
=>
{
axios
.
post
(
`http://
${
process
.
env
.
SERVER
||
'
localhost:5000
'
}${
req
.
url
}
`
,
{},
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
})
.
then
((
r
)
=>
res
.
end
(
JSON
.
stringify
(
r
.
data
)))
.
catch
(
err
=>
res
.
end
(
JSON
.
stringify
(
err
.
message
)));
});
server
.
listen
(
5001
,
()
=>
console
.
info
(
'
Listening on port 5001...
'
));
test/e2e-v2/cases/nodejs/docker-compose.yml
0 → 100644
浏览文件 @
f4c99db4
# 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
:
build
:
context
:
.
dockerfile
:
Dockerfile.nodejs
args
:
-
SW_AGENT_NODEJS_COMMIT=${SW_AGENT_NODEJS_COMMIT}
networks
:
-
e2e
expose
:
-
5000
environment
:
SW_AGENT_COLLECTOR_BACKEND_SERVICES
:
oap:11800
SW_AGENT_INSTANCE
:
provider-instance
volumes
:
-
./provider.ts:/app/provider.ts
depends_on
:
oap
:
condition
:
service_healthy
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/5000"
]
interval
:
5s
timeout
:
60s
retries
:
120
entrypoint
:
[
'
npx'
,
'
ts-node'
,
'
/app/provider.ts'
]
medium
:
extends
:
file
:
../../script/docker-compose/base-compose.yml
service
:
consumer
environment
:
PROVIDER_URL
:
http://provider:5000
depends_on
:
oap
:
condition
:
service_healthy
provider
:
condition
:
service_healthy
consumer
:
build
:
context
:
.
dockerfile
:
Dockerfile.nodejs
args
:
-
SW_AGENT_NODEJS_COMMIT=${SW_AGENT_NODEJS_COMMIT}
networks
:
-
e2e
ports
:
-
5001
environment
:
SW_AGENT_COLLECTOR_BACKEND_SERVICES
:
oap:11800
SW_AGENT_INSTANCE
:
consumer-instance
SERVER
:
medium:9092
volumes
:
-
./consumer.ts:/app/consumer.ts
depends_on
:
oap
:
condition
:
service_healthy
medium
:
condition
:
service_healthy
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/5051"
]
interval
:
5s
timeout
:
60s
retries
:
120
entrypoint
:
[
'
npx'
,
'
ts-node'
,
'
/app/consumer.ts'
]
networks
:
e2e
:
test/e2e-v2/cases/nodejs/e2e.yaml
0 → 100644
浏览文件 @
f4c99db4
# 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_5001}/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://${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=provider
expected
:
expected/service-instance-provider-nodejs.yml
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=consumer
expected
:
expected/service-instance-consumer-nodejs.yml
# service endpoint
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=provider
expected
:
expected/service-endpoint-provider-nodejs.yml
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=consumer
expected
:
expected/service-endpoint-consumer-nodejs.yml
# trace segment list
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
expected
:
expected/traces-list.yml
# dependency service
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=provider
expected
:
expected/dependency-services-provider-nodejs.yml
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=consumer
expected
:
expected/dependency-services-consumer-nodejs.yml
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=e2e-service-consumer
expected
:
expected/dependency-services-consumer.yml
# dependency instance
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency instance --service-name=consumer --dest-service-name=e2e-service-consumer
expected
:
expected/dependency-instance.yml
# service metrics
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_sla --service-name=consumer |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=consumer |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=consumer |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=consumer |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=provider-instance --service-name=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=provider-instance --service-name=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=provider-instance --service-name=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=/users --service-name=consumer |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=/users --service-name=consumer |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=/users --service-name=consumer |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=consumer --dest-service-name=e2e-service-consumer |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=consumer --dest-service-name=e2e-service-consumer |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_client_cpm --service-name=e2e-service-consumer --dest-service-name=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=e2e-service-consumer --dest-service-name=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=consumer-instance --service-name=consumer --dest-instance-name=consumer1 --dest-service-name=e2e-service-consumer |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_relation_server_cpm --instance-name=consumer-instance --service-name=consumer --dest-instance-name=consumer1 --dest-service-name=e2e-service-consumer |yq e 'to_entries' -
expected
:
expected/metrics-has-value.yml
test/e2e-v2/cases/nodejs/expected/dependency-instance.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "consumer1" }}
name
:
consumer1
serviceid
:
{{
b64enc "e2e-service-consumer"
}}
.1
servicename
:
e2e-service-consumer
type
:
Tomcat
isreal
:
true
-
id
:
{{
b64enc "consumer"
}}
.1_{{ b64enc "consumer-instance" }}
name
:
consumer-instance
serviceid
:
{{
b64enc "consumer"
}}
.1
servicename
:
consumer
type
:
"
"
isreal
:
true
{{
- end
}}
calls
:
{{
- contains .calls
}}
-
source
:
{{
b64enc "consumer"
}}
.1_{{ b64enc "consumer-instance" }}
sourcecomponents
:
[]
target
:
{{
b64enc "e2e-service-consumer"
}}
.1_{{ b64enc "consumer1" }}
targetcomponents
:
[]
id
:
{{
b64enc "consumer"
}}
.1_{{ b64enc "consumer-instance" }}-{{ b64enc "e2e-service-consumer" }}.1_{{ b64enc "consumer1" }}
detectpoints
:
-
CLIENT
-
SERVER
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "consumer"
}}
.1
name
:
consumer
type
:
http
isreal
:
true
{{
- end
}}
calls
:
{{
- contains .calls
}}
-
source
:
{{
b64enc "consumer"
}}
.1
sourcecomponents
:
[]
target
:
{{
b64enc "e2e-service-consumer"
}}
.1
targetcomponents
:
[]
id
:
{{
b64enc "consumer"
}}
.1-{{ b64enc "e2e-service-consumer" }}.1
detectpoints
:
-
CLIENT
-
SERVER
-
source
:
{{
b64enc "User"
}}
.0
sourcecomponents
:
[]
target
:
{{
b64enc "consumer"
}}
.1
targetcomponents
:
[]
id
:
{{
b64enc "User"
}}
.0-{{ b64enc "consumer" }}.1
detectpoints
:
-
SERVER
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "provider"
}}
.1
name
:
provider
type
:
Express
isreal
:
true
-
id
:
{{
b64enc "e2e-service-consumer"
}}
.1
name
:
e2e-service-consumer
type
:
Tomcat
isreal
:
true
-
id
:
{{
b64enc "consumer"
}}
.1
name
:
consumer
type
:
http
isreal
:
true
{{
- end
}}
calls
:
{{
- contains .calls
}}
-
source
:
{{
b64enc "e2e-service-consumer"
}}
.1
sourcecomponents
:
[]
target
:
{{
b64enc "provider"
}}
.1
targetcomponents
:
[]
id
:
{{
b64enc "e2e-service-consumer"
}}
.1-{{ b64enc "provider" }}.1
detectpoints
:
-
CLIENT
-
SERVER
-
source
:
{{
b64enc "consumer"
}}
.1
sourcecomponents
:
[]
target
:
{{
b64enc "e2e-service-consumer"
}}
.1
targetcomponents
:
[]
id
:
{{
b64enc "consumer"
}}
.1-{{ b64enc "e2e-service-consumer" }}.1
detectpoints
:
-
CLIENT
-
SERVER
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "provider"
}}
.1
name
:
provider
type
:
Express
isreal
:
true
-
id
:
{{
b64enc "e2e-service-consumer"
}}
.1
name
:
e2e-service-consumer
type
:
Tomcat
isreal
:
true
{{
- end
}}
calls
:
{{
- contains .calls
}}
-
source
:
{{
b64enc "e2e-service-consumer"
}}
.1
sourcecomponents
:
[]
target
:
{{
b64enc "provider"
}}
.1
targetcomponents
:
[]
id
:
{{
b64enc "e2e-service-consumer"
}}
.1-{{ b64enc "provider" }}.1
detectpoints
:
-
CLIENT
-
SERVER
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/metrics-has-value.yml
0 → 100644
浏览文件 @
f4c99db4
# 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
}}
\ No newline at end of file
test/e2e-v2/cases/nodejs/expected/service-endpoint-consumer-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "consumer"
}}
.1_{{ b64enc "/users" }}
name
:
/users
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/service-endpoint-provider-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "provider"
}}
.1_{{ b64enc "/users" }}
name
:
/users
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/service-instance-consumer-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "consumer"
}}
.1_{{ b64enc "consumer-instance" }}
name
:
consumer-instance
attributes
:
{{
- contains .attributes
}}
-
name
:
OS Name
value
:
linux
-
name
:
"
"
value
:
"
1"
-
name
:
ipv4s
value
:
"
"
{{
- end
}}
language
:
UNKNOWN
instanceuuid
:
{{
b64enc "consumer"
}}
.1_{{ b64enc "consumer-instance" }}
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/service-instance-provider-nodejs.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "provider"
}}
.1_{{ b64enc "provider-instance" }}
name
:
provider-instance
attributes
:
{{
- contains .attributes
}}
-
name
:
OS Name
value
:
linux
-
name
:
"
"
value
:
"
1"
-
name
:
ipv4s
value
:
"
"
{{
- end
}}
language
:
UNKNOWN
instanceuuid
:
{{
b64enc "provider"
}}
.1_{{ b64enc "provider-instance" }}
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/service.yml
0 → 100644
浏览文件 @
f4c99db4
# 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 "consumer"
}}
.1
name
:
consumer
group
:
"
"
-
id
:
{{
b64enc "provider"
}}
.1
name
:
provider
group
:
"
"
-
id
:
{{
b64enc "e2e-service-consumer"
}}
.1
name
:
e2e-service-consumer
group
:
"
"
{{
- end
}}
test/e2e-v2/cases/nodejs/expected/traces-list.yml
0 → 100644
浏览文件 @
f4c99db4
# 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
:
-
/users
duration
:
{{
ge .duration 0
}}
start
:
"
{{
notEmpty
.start}}"
iserror
:
false
traceids
:
-
{{
(index .traceids 0)
}}
{{
- end
}}
total
:
{{
gt .total 0
}}
test/e2e-v2/cases/nodejs/provider.ts
0 → 100644
浏览文件 @
f4c99db4
/*!
*
* 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.
*
*/
import
agent
from
'
./src
'
;
import
express
from
'
express
'
;
agent
.
start
({
serviceName
:
'
provider
'
,
maxBufferSize
:
1000
,
});
const
app
=
express
();
const
handle
=
(
req
,
res
)
=>
setTimeout
(()
=>
res
.
send
({
'
id
'
:
1
,
'
name
'
:
'
ke
'
}),
200
);
app
.
get
(
'
/users
'
,
handle
);
app
.
post
(
'
/users
'
,
handle
);
app
.
listen
(
5000
,
()
=>
console
.
info
(
'
Listening on port 5000...
'
));
test/e2e-v2/script/env
浏览文件 @
f4c99db4
...
...
@@ -16,5 +16,6 @@
SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
SW_CTL_COMMIT=515a6a415f83a2e7ba114ca8c6fc79e2acd0ee4e
\ No newline at end of file
SW_CTL_COMMIT=515a6a415f83a2e7ba114ca8c6fc79e2acd0ee4e
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录