Skip to content

Commit 34c7d4f

Browse files
petebacondarwinpenalosa
authored andcommitted
ci: skip Miniflare browser CA certificate tests during local testing (#7517)
This test seems to fail on developer machines locally. Possibly because our WARP setup requires self-signed root CA certificates? The tests will still run in GitHub so we do not lose test safety. Just the small chance that failures only get picked up at CI test time and not when in development.
1 parent 79ef1f6 commit 34c7d4f

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

packages/miniflare/test/index.spec.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,20 +1335,24 @@ test("Miniflare: python modules", async (t) => {
13351335
t.is(await res.text(), "4");
13361336
});
13371337

1338-
test("Miniflare: HTTPS fetches using browser CA certificates", async (t) => {
1339-
const mf = new Miniflare({
1340-
modules: true,
1341-
script: `export default {
1338+
if (process.env.CI) {
1339+
// This test seems to fail on developer machines locally.
1340+
// Possibly because our WARP setup requires self-signed root CA certificates?
1341+
test("Miniflare: HTTPS fetches using browser CA certificates", async (t) => {
1342+
const mf = new Miniflare({
1343+
modules: true,
1344+
script: `export default {
13421345
fetch() {
13431346
return fetch("https://workers.cloudflare.com/cf.json");
13441347
}
13451348
}`,
1349+
});
1350+
t.teardown(() => mf.dispose());
1351+
const res = await mf.dispatchFetch("http://localhost");
1352+
t.true(res.ok);
1353+
await res.arrayBuffer(); // (drain)
13461354
});
1347-
t.teardown(() => mf.dispose());
1348-
const res = await mf.dispatchFetch("http://localhost");
1349-
t.true(res.ok);
1350-
await res.arrayBuffer(); // (drain)
1351-
});
1355+
}
13521356

13531357
test("Miniflare: accepts https requests", async (t) => {
13541358
const log = new TestLog(t);

0 commit comments

Comments
 (0)