Skip to content

Commit 09bf6b8

Browse files
fix(wrangler): fix failing R2 e2e test (#7203)
1 parent e221401 commit 09bf6b8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/wrangler/e2e/helpers/normalize.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export function normalizeOutput(
1111
removeWorkersDev,
1212
removeWorkerPreviewUrl,
1313
removeUUID,
14+
removeBinding,
1415
normalizeErrorMarkers,
1516
replaceByte,
1617
stripTrailingWhitespace,
@@ -62,12 +63,19 @@ function removeTimestamp(str: string) {
6263
.replace(/\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d+?Z/g, "TIMESTAMP")
6364
.replace(/\d\d:\d\d:\d\d/g, "TIMESTAMP");
6465
}
66+
6567
function removeUUID(str: string) {
6668
return str.replace(
6769
/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/g,
6870
"00000000-0000-0000-0000-000000000000"
6971
);
7072
}
73+
function removeBinding(str: string) {
74+
return str.replace(
75+
/\w{8}_\w{4}_\w{4}_\w{4}_\w{12}/g,
76+
"00000000_0000_0000_0000_000000000000"
77+
);
78+
}
7179

7280
/**
7381
* Remove the Wrangler version/update check header

packages/wrangler/e2e/r2.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ describe("r2", () => {
2121

2222
expect(normalize(output.stdout)).toMatchInlineSnapshot(`
2323
"Creating bucket 'tmp-e2e-r2-00000000-0000-0000-0000-000000000000'...
24-
✅ Created bucket 'tmp-e2e-r2-00000000-0000-0000-0000-000000000000' with default storage class of Standard."
24+
✅ Created bucket 'tmp-e2e-r2-00000000-0000-0000-0000-000000000000' with default storage class of Standard.
25+
Configure your Worker to write objects to this bucket:
26+
[[r2_buckets]]
27+
bucket_name = "tmp-e2e-r2-00000000-0000-0000-0000-000000000000"
28+
binding = "tmp_e2e_r2_00000000_0000_0000_0000_000000000000""
2529
`);
2630
});
2731

0 commit comments

Comments
 (0)