Skip to content

Commit 06dd62b

Browse files
committed
test
1 parent a42cfe0 commit 06dd62b

File tree

3 files changed

+60
-13
lines changed

3 files changed

+60
-13
lines changed

.github/workflows/udp-exporter-e2e-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
cd exporters/aws-distro-opentelemetry-exporter-xray-udp
3232
npm pack
3333
34-
- name: Configure AWS credentials for Testing Tracing
35-
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
36-
with:
37-
role-to-assume: ${{ secrets.XRAY_UDP_EXPORTER_TEST_ROLE }}
38-
aws-region: 'us-east-1'
34+
# - name: Configure AWS credentials for Testing Tracing
35+
# uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
36+
# with:
37+
# role-to-assume: ${{ secrets.XRAY_UDP_EXPORTER_TEST_ROLE }}
38+
# aws-region: 'us-east-1'
3939

4040
- name: Download and run X-Ray Daemon
4141
run: |

exporters/aws-distro-opentelemetry-exporter-xray-udp/test/otlp-udp-exporter.test.ts renamed to exporters/aws-distro-opentelemetry-exporter-xray-udp/test/aws-xray-udp-span-exporter.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('UdpExporterTest', () => {
7575
});
7676

7777
describe('AwsXrayUdpSpanExporterTest', () => {
78-
let AwsXrayUdpSpanExporter: AwsXrayUdpSpanExporter;
78+
let awsXrayUdpSpanExporter: AwsXrayUdpSpanExporter;
7979
let udpExporterMock: { sendData: any; shutdown: any };
8080
let diagErrorSpy: sinon.SinonSpy<[message: string, ...args: unknown[]], void>;
8181
const endpoint = '127.0.0.1:3000';
@@ -124,7 +124,7 @@ describe('AwsXrayUdpSpanExporterTest', () => {
124124
diagErrorSpy = sinon.spy(diag, 'error');
125125

126126
// Create an instance of AwsXrayUdpSpanExporter
127-
AwsXrayUdpSpanExporter = new AwsXrayUdpSpanExporter(endpoint, prefix);
127+
awsXrayUdpSpanExporter = new AwsXrayUdpSpanExporter(endpoint, prefix);
128128
});
129129

130130
afterEach(() => {
@@ -137,7 +137,7 @@ describe('AwsXrayUdpSpanExporterTest', () => {
137137
// Stub ProtobufTraceSerializer.serializeRequest
138138
sinon.stub(ProtobufTraceSerializer, 'serializeRequest').returns(serializedData);
139139

140-
AwsXrayUdpSpanExporter.export(spans, callback);
140+
awsXrayUdpSpanExporter.export(spans, callback);
141141

142142
expect(udpExporterMock.sendData.calledOnceWith(serializedData, 'T1')).toBe(true);
143143
expect(callback.calledOnceWith({ code: ExportResultCode.SUCCESS })).toBe(true);
@@ -149,7 +149,7 @@ describe('AwsXrayUdpSpanExporterTest', () => {
149149
sinon.stub(ProtobufTraceSerializer, 'serializeRequest').returns(undefined);
150150
const callback = sinon.stub();
151151

152-
AwsXrayUdpSpanExporter.export(spans, callback);
152+
awsXrayUdpSpanExporter.export(spans, callback);
153153

154154
expect(callback.notCalled).toBe(true);
155155
expect(udpExporterMock.sendData.notCalled).toBe(true);
@@ -162,18 +162,18 @@ describe('AwsXrayUdpSpanExporterTest', () => {
162162

163163
const callback = sinon.stub();
164164

165-
AwsXrayUdpSpanExporter.export(spans, callback);
165+
awsXrayUdpSpanExporter.export(spans, callback);
166166

167167
expect(diagErrorSpy.calledOnceWith('Error exporting spans: %s', sinon.match.instanceOf(Error))).toBe(true);
168168
expect(callback.calledOnceWith({ code: ExportResultCode.FAILED })).toBe(true);
169169
});
170170

171171
it('should forceFlush without throwing', async () => {
172-
expect(AwsXrayUdpSpanExporter.forceFlush()).resolves.not.toThrow();
172+
expect(awsXrayUdpSpanExporter.forceFlush()).resolves.not.toThrow();
173173
});
174174

175175
it('should shutdown the UDP exporter successfully', async () => {
176-
await AwsXrayUdpSpanExporter.shutdown();
176+
await awsXrayUdpSpanExporter.shutdown();
177177
expect(udpExporterMock.shutdown.calledOnce).toBe(true);
178178
});
179179

package-lock.json

Lines changed: 48 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)