Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-pytel committed Jan 26, 2021
1 parent 41bf22f commit 530d1bf
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
8 changes: 8 additions & 0 deletions tests/plugins/axios/expected.data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ segmentItems:
tags:
- key: http.url
value: httpbin.org:80/json
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -53,6 +55,8 @@ segmentItems:
tags:
- key: http.url
value: server:5000/axios
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -79,6 +83,8 @@ segmentItems:
tags:
- key: http.url
value: server:5000/axios
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -97,6 +103,8 @@ segmentItems:
tags:
- key: http.url
value: localhost:5001/axios
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/express/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.get('/express', (req, res) => {
.request(`http://${process.env.SERVER || 'localhost:5000'}${req.url}`, (r) => {
let data = '';
r.on('data', (chunk) => (data += chunk));
r.on('end', () => res.send(data));
r.on('close', () => res.send(data));
})
.end();
});
Expand Down
8 changes: 8 additions & 0 deletions tests/plugins/express/expected.data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ segmentItems:
tags:
- key: http.url
value: httpbin.org/json
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -47,6 +49,8 @@ segmentItems:
tags:
- key: http.url
value: server:5000/express
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand Down Expand Up @@ -79,6 +83,8 @@ segmentItems:
tags:
- key: http.url
value: server:5000/express
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -97,6 +103,8 @@ segmentItems:
tags:
- key: http.url
value: localhost:5001/express
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/express/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.get('/express', (req, res) => {
.request('http://httpbin.org/json', (r) => {
let data = '';
r.on('data', (chunk) => (data += chunk));
r.on('end', () => res.send(data));
r.on('close', () => res.send(data));
})
.end();
});
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/http/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const server = http.createServer((req, res) => {
.request(`http://${process.env.SERVER || 'localhost:5000'}${req.url}`, (r) => {
let data = '';
r.on('data', (chunk) => (data += chunk));
r.on('end', () => res.end(data));
r.on('close', () => res.end(data));
})
.end();
});
Expand Down
8 changes: 8 additions & 0 deletions tests/plugins/http/expected.data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ segmentItems:
value: server:5000/test
- key: http.status.code
value: '200'
- key: http.method
value: GET
refs:
- parentEndpoint: ''
networkAddress: server:5000
Expand All @@ -60,6 +62,8 @@ segmentItems:
tags:
- key: http.url
value: httpbin.org/json
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand All @@ -83,6 +87,8 @@ segmentItems:
tags:
- key: http.url
value: localhost:5001/test
- key: http.method
value: GET
- key: http.status.code
value: '200'
- operationName: /test
Expand All @@ -99,6 +105,8 @@ segmentItems:
tags:
- key: http.url
value: server:5000/test
- key: http.method
value: GET
- key: http.status.code
value: '200'
- key: http.status.msg
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/http/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const server = http.createServer((req, res) => {
.request('http://httpbin.org/json', (r) => {
let data = '';
r.on('data', (chunk) => (data += chunk));
r.on('end', () => res.end(data));
r.on('close', () => res.end(data));
})
.end();
});
Expand Down

0 comments on commit 530d1bf

Please sign in to comment.