Skip to content

Commit c0ff4df

Browse files
chore(test): remove nock.orgConfig in handlers that have org/site
1 parent c40857e commit c0ff4df

33 files changed

+31
-94
lines changed

test/auth/authenticate.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ describe('Authentication Test', () => {
7777

7878
describe('`getAuthInfo`', () => {
7979
beforeEach(() => {
80-
nock.orgConfig().reply(404);
8180
nock.siteConfig(SITE_CONFIG);
8281
});
8382

@@ -518,7 +517,6 @@ describe('Authentication Test', () => {
518517

519518
describe('Site API Token', () => {
520519
async function testApiToken(sub, jti, apiKeyId, audience = ADMIN_CLIENT_ID) {
521-
nock.orgConfig().reply(404);
522520
nock.siteConfig({
523521
...SITE_CONFIG,
524522
access: {
@@ -1019,7 +1017,6 @@ describe('IMS Authentication Test', () => {
10191017
nock = new Nock().env();
10201018

10211019
nock.siteConfig(SITE_CONFIG);
1022-
nock.orgConfig().reply(404);
10231020
});
10241021

10251022
afterEach(() => {

test/cache/handler.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Request, Response } from '@adobe/fetch';
1616
import { AuthInfo } from '../../src/auth/auth-info.js';
1717
import purge from '../../src/cache/purge.js';
1818
import { main } from '../../src/index.js';
19-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
19+
import { Nock, SITE_CONFIG } from '../utils.js';
2020

2121
describe('Cache Handler Tests', () => {
2222
/** @type {import('../utils.js').NockEnv} */
@@ -30,7 +30,6 @@ describe('Cache Handler Tests', () => {
3030
sandbox = sinon.createSandbox();
3131

3232
nock.siteConfig(SITE_CONFIG);
33-
nock.orgConfig(ORG_CONFIG);
3433
});
3534

3635
afterEach(() => {

test/contentproxy/google-file.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Request } from '@adobe/fetch';
1919
import { GoogleClient } from '@adobe/helix-google-support';
2020
import { AuthInfo } from '../../src/auth/auth-info.js';
2121
import { main } from '../../src/index.js';
22-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
22+
import { Nock, SITE_CONFIG } from '../utils.js';
2323

2424
const TEST_BYTES = randomBytes(8192);
2525

@@ -30,8 +30,6 @@ describe('Google File Tests', () => {
3030
beforeEach(() => {
3131
nock = new Nock().env();
3232
GoogleClient.setItemCacheOptions({ max: 1000 });
33-
34-
nock.orgConfig(ORG_CONFIG);
3533
});
3634

3735
afterEach(() => {

test/contentproxy/google-json.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { GoogleClient } from '@adobe/helix-google-support';
1919
import { AuthInfo } from '../../src/auth/auth-info.js';
2020
import { sanitizeHtml } from '../../src/contentproxy/google-json.js';
2121
import { main } from '../../src/index.js';
22-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
22+
import { Nock, SITE_CONFIG } from '../utils.js';
2323
import { getFormattedCellsSheet } from './fixtures/formatted-cells-sheet.js';
2424
import { getFormattedCellsValues } from './fixtures/formatted-cells-values.js';
2525
import TEST_STRUCTURES_VALUES from './fixtures/structure-values.js';
@@ -34,7 +34,6 @@ describe('Google JSON Tests', () => {
3434
GoogleClient.setItemCacheOptions({ max: 1000 });
3535

3636
nock.siteConfig(SITE_CONFIG);
37-
nock.orgConfig(ORG_CONFIG);
3837
});
3938

4039
afterEach(() => {

test/contentproxy/google.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Request } from '@adobe/fetch';
1616
import { GoogleClient } from '@adobe/helix-google-support';
1717
import { AuthInfo } from '../../src/auth/auth-info.js';
1818
import { main } from '../../src/index.js';
19-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
19+
import { Nock, SITE_CONFIG } from '../utils.js';
2020

2121
describe('Google Integration Tests', () => {
2222
/** @type {import('../utils.js').NockEnv} */
@@ -27,7 +27,6 @@ describe('Google Integration Tests', () => {
2727
GoogleClient.setItemCacheOptions({ max: 1000 });
2828

2929
nock.siteConfig(SITE_CONFIG);
30-
nock.orgConfig(ORG_CONFIG);
3130
});
3231

3332
afterEach(() => {

test/contentproxy/handler.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ import assert from 'assert';
1414
import { Request } from '@adobe/fetch';
1515
import { AuthInfo } from '../../src/auth/auth-info.js';
1616
import { main } from '../../src/index.js';
17-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
17+
import { Nock, SITE_CONFIG } from '../utils.js';
1818

1919
describe('ContentProxy Handler Tests', () => {
2020
/** @type {import('../utils.js').NockEnv} */
2121
let nock;
2222

2323
beforeEach(() => {
2424
nock = new Nock().env();
25-
26-
nock.orgConfig(ORG_CONFIG);
2725
});
2826

2927
afterEach(() => {

test/contentproxy/markup-file.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { resolve } from 'path';
1818
import { Request } from '@adobe/fetch';
1919
import { AuthInfo } from '../../src/auth/auth-info.js';
2020
import { main } from '../../src/index.js';
21-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
21+
import { Nock, SITE_CONFIG } from '../utils.js';
2222

2323
const mountpointUrl = 'https://www.example.com';
2424

@@ -40,8 +40,6 @@ describe('Markup File Tests', () => {
4040

4141
beforeEach(() => {
4242
nock = new Nock().env();
43-
44-
nock.orgConfig(ORG_CONFIG);
4543
});
4644

4745
afterEach(() => {

test/contentproxy/markup-json.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import assert from 'assert';
1515
import { Request } from '@adobe/fetch';
1616
import { AuthInfo } from '../../src/auth/auth-info.js';
1717
import { main } from '../../src/index.js';
18-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
18+
import { Nock, SITE_CONFIG } from '../utils.js';
1919
import { validSheet } from './utils.js';
2020

2121
const mountpointUrl = 'https://www.example.com';
@@ -38,8 +38,6 @@ describe('Markup Integration Tests (JSON)', () => {
3838

3939
beforeEach(() => {
4040
nock = new Nock().env();
41-
42-
nock.orgConfig(ORG_CONFIG);
4341
});
4442

4543
afterEach(() => {

test/contentproxy/markup.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { promisify } from 'util';
1717
import { Request } from '@adobe/fetch';
1818
import { AuthInfo } from '../../src/auth/auth-info.js';
1919
import { main } from '../../src/index.js';
20-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
20+
import { Nock, SITE_CONFIG } from '../utils.js';
2121

2222
const gunzipAsync = promisify(gunzip);
2323

@@ -51,8 +51,6 @@ describe('Markup Integration Tests', () => {
5151

5252
beforeEach(() => {
5353
nock = new Nock().env();
54-
55-
nock.orgConfig(ORG_CONFIG);
5654
});
5755

5856
afterEach(() => {

test/contentproxy/onedrive-file.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Request } from '@adobe/fetch';
1717
import { AcquireMethod, OneDrive } from '@adobe/helix-onedrive-support';
1818
import { AuthInfo } from '../../src/auth/auth-info.js';
1919
import { main } from '../../src/index.js';
20-
import { Nock, SITE_CONFIG, ORG_CONFIG } from '../utils.js';
20+
import { Nock, SITE_CONFIG } from '../utils.js';
2121

2222
const SITE_1D_CONFIG = {
2323
...SITE_CONFIG,
@@ -44,7 +44,6 @@ describe('OneDrive Integration Tests (file)', () => {
4444
nock = new Nock().env();
4545

4646
nock.siteConfig(SITE_1D_CONFIG);
47-
nock.orgConfig(ORG_CONFIG);
4847
});
4948

5049
afterEach(() => {

0 commit comments

Comments
 (0)