Skip to content

Commit 3f399fa

Browse files
authored
Remove resource location requirement during storage init (#7905)
* remove resource location requirement during storage init * remove test
1 parent 53976c9 commit 3f399fa

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

src/ensureCloudResourceLocation.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/init/features/storage.spec.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { expect } from "chai";
22
import * as _ from "lodash";
33
import * as sinon from "sinon";
44

5-
import { FirebaseError } from "../../error";
65
import { Config } from "../../config";
76
import { doSetup } from "./storage";
87
import * as prompt from "../../prompt";
@@ -36,18 +35,5 @@ describe("storage", () => {
3635

3736
expect(_.get(setup, "config.storage.rules")).to.deep.equal("storage.rules");
3837
});
39-
40-
it("should error when cloud resource location is not set", async () => {
41-
const setup = {
42-
config: {},
43-
rcfile: {},
44-
projectId: "my-project-123",
45-
};
46-
47-
await expect(doSetup(setup, new Config("/path/to/src", {}))).to.eventually.be.rejectedWith(
48-
FirebaseError,
49-
"Cloud resource location is not set",
50-
);
51-
});
5238
});
5339
});

src/init/features/storage.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ import * as clc from "colorette";
22

33
import { logger } from "../../logger";
44
import { promptOnce } from "../../prompt";
5-
import { ensureLocationSet } from "../../ensureCloudResourceLocation";
65
import { readTemplateSync } from "../../templates";
76

87
const RULES_TEMPLATE = readTemplateSync("init/storage/storage.rules");
98

109
export async function doSetup(setup: any, config: any): Promise<void> {
1110
setup.config.storage = {};
12-
ensureLocationSet(setup.projectLocation, "Cloud Storage");
1311

1412
logger.info();
1513
logger.info("Firebase Storage Security Rules allow you to define how and when to allow");

0 commit comments

Comments
 (0)