Skip to content

Commit

Permalink
Add CHANGELOG entry
Browse files Browse the repository at this point in the history
  • Loading branch information
tohhsinpei committed Mar 25, 2022
1 parent f068c9f commit f266de4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fixes bug where resumable uploads were not setting custom metadata on upload (#3398).
- Fixes bug where GCS metadataUpdate cloud functions were triggered in incorrect situations (#3398).
- Fixes bug where quoted escape sequences in .env files were incompletely unescaped. (#4270)
- Fixes issue with importing Storage Emulator data exported prior to v10.3.0 (#4358).
13 changes: 8 additions & 5 deletions scripts/storage-emulator-integration/import/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ import {
TEST_SETUP_TIMEOUT,
} from "../utils";

const FIREBASE_PROJECT = process.env.FBTOOLS_TARGET_PROJECT || "fake-project-id";

describe("Import Emulator Data", () => {
const FIREBASE_PROJECT = "fake-project-id";
const bucket = `${FIREBASE_PROJECT}.appspot.com`;
const emulatorConfig = readEmulatorConfig(FIREBASE_EMULATOR_CONFIG);
const STORAGE_EMULATOR_HOST = getStorageEmulatorHost(emulatorConfig);
const test = new TriggerEndToEndTest(FIREBASE_PROJECT, __dirname, emulatorConfig);

it("retrieves file from imported flattened emulator data", async function (this) {
this.timeout(TEST_SETUP_TIMEOUT);
await test.startEmulators(["--only", Emulators.STORAGE, "--import=./flattened-emulator-data"]);
await test.startEmulators([
"--only",
Emulators.STORAGE,
`--import=${__dirname}/flattened-emulator-data`,
]);

await supertest(STORAGE_EMULATOR_HOST)
.get(`/v0/b/${bucket}/o/test_upload.jpg`)
.set({Authorization: "Bearer owner"})
.set({ Authorization: "Bearer owner" })
.expect(200);
});

Expand All @@ -33,7 +36,7 @@ describe("Import Emulator Data", () => {

await supertest(STORAGE_EMULATOR_HOST)
.get(`/v0/b/${bucket}/o/test_upload.jpg`)
.set({Authorization: "Bearer owner"})
.set({ Authorization: "Bearer owner" })
.expect(200);
});

Expand Down

0 comments on commit f266de4

Please sign in to comment.