-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathtest.ts
31 lines (28 loc) · 849 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner';
const EXPECTED_TRANSCATION = {
transaction: 'Test Transaction',
spans: expect.arrayContaining([
expect.objectContaining({
description: 'S3.PutObject',
op: 'rpc',
origin: 'auto.otel.aws',
data: {
'sentry.origin': 'auto.otel.aws',
'sentry.op': 'rpc',
'rpc.system': 'aws-api',
'rpc.method': 'PutObject',
'rpc.service': 'S3',
'aws.region': 'us-east-1',
'otel.kind': 'CLIENT',
},
}),
]),
};
describe('awsIntegration', () => {
afterAll(() => {
cleanupChildProcesses();
});
test('should auto-instrument aws-sdk v2 package.', done => {
createRunner(__dirname, 'scenario.js').ignore('event').expect({ transaction: EXPECTED_TRANSCATION }).start(done);
});
});