Skip to content

Commit 06918b9

Browse files
if the CLOUDFLARE_ACCOUNT_ID was an empty string it caused e2e tests to fail (#11005)
1 parent 3bb034f commit 06918b9

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

packages/wrangler/e2e/cert.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ import { WranglerE2ETestHelper } from "./helpers/e2e-wrangler-test";
1111
import { normalizeOutput } from "./helpers/normalize";
1212

1313
describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)("cert", () => {
14-
const normalize = (str: string) =>
15-
normalizeOutput(
16-
str,
17-
process.env.CLOUDFLARE_ACCOUNT_ID
18-
? {
19-
[process.env.CLOUDFLARE_ACCOUNT_ID]: "CLOUDFLARE_ACCOUNT_ID",
20-
}
21-
: {}
22-
);
14+
const normalize = (str: string) => normalizeOutput(str);
2315
const helper = new WranglerE2ETestHelper();
2416
// Generate root and leaf certificates
2517
const { certificate: rootCert, privateKey: rootKey } =

packages/wrangler/e2e/helpers/normalize.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ function normalizeAuthor(stdout: string) {
213213
}
214214

215215
function normalizeAccountId(stdout: string) {
216-
return stdout.replaceAll(CLOUDFLARE_ACCOUNT_ID, "CLOUDFLARE_ACCOUNT_ID");
216+
return CLOUDFLARE_ACCOUNT_ID
217+
? stdout.replaceAll(CLOUDFLARE_ACCOUNT_ID, "CLOUDFLARE_ACCOUNT_ID")
218+
: stdout;
217219
}
218220

219221
/**

packages/wrangler/e2e/r2.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)("r2", () => {
1313
const normalize = (str: string) =>
1414
normalizeOutput(str, {
1515
[bucketName]: "tmp-e2e-r2",
16-
...(process.env.CLOUDFLARE_ACCOUNT_ID
17-
? {
18-
[process.env.CLOUDFLARE_ACCOUNT_ID]: "CLOUDFLARE_ACCOUNT_ID",
19-
}
20-
: {}),
2116
});
2217
const helper = new WranglerE2ETestHelper();
2318

packages/wrangler/e2e/secrets-store.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ describe.each(RUNTIMES)(
3232
return normalizeOutput(str, {
3333
[storeName]: "tmp-e2e-secrets-store-store",
3434
[secretName]: "tmp-e2e-secrets-store-secret",
35-
...(process.env.CLOUDFLARE_ACCOUNT_ID
36-
? {
37-
[process.env.CLOUDFLARE_ACCOUNT_ID]: "CLOUDFLARE_ACCOUNT_ID",
38-
}
39-
: {}),
4035
});
4136
};
4237

0 commit comments

Comments
 (0)