Skip to content

Commit a18a5fe

Browse files
committed
test(storage): use paths that work against cloud or emulator
against cloud we have to use paths that work with existing rules
1 parent b7183ef commit a18a5fe

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/scripts/storage.rules

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ service firebase.storage {
55
allow read, write: if false;
66
}
77

8-
match /writeOnly.txt {
8+
match /writeOnly.jpeg {
99
allow read: if false;
1010
allow write: if true;
1111
}
1212

13-
match /react-native-tests/{document=**} {
13+
match /playground/{document=**} {
14+
allow read, write: if true;
15+
}
16+
17+
match /react-native-firebase-testing/{document=**} {
1418
allow read, write: if true;
1519
}
1620
}

packages/storage/e2e/helpers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ const testingUtils = require('@firebase/rules-unit-testing');
33
// TODO make more unique?
44
const ID = Date.now();
55

6-
const PATH_ROOT = 'react-native-tests';
6+
const PATH_ROOT = 'playground';
77
const PATH = `${PATH_ROOT}/${ID}`;
8-
const WRITE_ONLY_NAME = 'writeOnly.txt';
8+
const WRITE_ONLY_NAME = 'writeOnly.jpeg';
99

1010
exports.seed = async function seed(path) {
1111
// Force the rules for the storage emulator to be what we expect
@@ -28,6 +28,10 @@ exports.seed = async function seed(path) {
2828
match /${PATH_ROOT}/{document=**} {
2929
allow read, write: if true;
3030
}
31+
32+
match /react-native-firebase-testing/{document=**} {
33+
allow read, write: if true;
34+
}
3135
}
3236
}`,
3337
host: 'localhost',

0 commit comments

Comments
 (0)