Skip to content

Commit 1cae7b3

Browse files
committed
Fix DD_SITE leak from dd-trace in CI
1 parent 980c9bd commit 1cae7b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/plugins/apps/src/index.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as identifier from '@dd/apps-plugin/identifier';
88
import * as uploader from '@dd/apps-plugin/upload';
99
import { getPlugins } from '@dd/apps-plugin';
1010
import * as fsHelpers from '@dd/core/helpers/fs';
11+
import { cleanEnv } from '@dd/tests/_jest/helpers/env';
1112
import {
1213
getGetPluginsArg,
1314
getMockBundler,
@@ -168,6 +169,8 @@ describe('Apps Plugin - getPlugins', () => {
168169
});
169170

170171
test('Should upload assets across all bundlers', async () => {
172+
// Need to clean env to avoid the `DD_SITE` leak from dd-trace in the CI.
173+
const restoreEnv = cleanEnv();
171174
const replyMock = jest.fn();
172175
const intakeHost = `https://${APPS_API_SUBDOMAIN}.example.com`;
173176
const scope = nock(intakeHost)
@@ -176,12 +179,13 @@ describe('Apps Plugin - getPlugins', () => {
176179
.reply(200, replyMock);
177180

178181
const { errors } = await runBundlers({
179-
auth: { site: 'example.com' },
180182
apps: { identifier: 'app-id' },
181183
});
182184

183185
expect(errors).toHaveLength(0);
184186
expect(replyMock).toHaveBeenCalledTimes(BUNDLERS.length);
185187
expect(scope.isDone()).toBe(true);
188+
189+
restoreEnv();
186190
});
187191
});

0 commit comments

Comments
 (0)