Skip to content

Commit 6ab3c4d

Browse files
committed
Use a different domain in proxy tests
1 parent 14496d6 commit 6ab3c4d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/compass-e2e-tests/tests/proxy.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ describe('Proxy support', function () {
6565
browser = compass.browser;
6666

6767
const result = await browser.execute(async function () {
68-
const response = await fetch('http://compass.mongodb.com/');
68+
const response = await fetch('http://proxy-test-compass.mongodb.com/');
6969
return await response.text();
7070
});
71-
expect(result).to.equal('hello, http://compass.mongodb.com/ (proxy1)');
71+
expect(result).to.equal(
72+
'hello, http://proxy-test-compass.mongodb.com/ (proxy1)'
73+
);
7274
});
7375

7476
it('can change the proxy option dynamically', async function () {
@@ -80,10 +82,12 @@ describe('Proxy support', function () {
8082
`http://localhost:${port(httpProxyServer2)}`
8183
);
8284
const result = await browser.execute(async function () {
83-
const response = await fetch('http://compass.mongodb.com/');
85+
const response = await fetch('http://proxy-test-compass.mongodb.com/');
8486
return await response.text();
8587
});
86-
expect(result).to.equal('hello, http://compass.mongodb.com/ (proxy2)');
88+
expect(result).to.equal(
89+
'hello, http://proxy-test-compass.mongodb.com/ (proxy2)'
90+
);
8791
});
8892

8993
context('when connecting to a cluster', function () {

packages/compass/src/app/utils/csp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function injectCSP() {
8989
extraAllowed.push('ws://localhost:*');
9090
// Used by proxy tests, since Chrome does not like proxying localhost
9191
// (this does not result in actual outgoing HTTP requests)
92-
extraAllowed.push('http://compass.mongodb.com/');
92+
extraAllowed.push('http://proxy-test-compass.mongodb.com/');
9393
}
9494
const cspContent =
9595
Object.entries(defaultCSP)

0 commit comments

Comments
 (0)