Skip to content

Commit 12b7397

Browse files
authored
Upgrade to Firestore Emulator 1.5.0 (#3171)
This includes fixes for: * All the field escaping tests * testCanWriteVeryLargeBatches * testWritesWithIndirectlyNestedArraysSucceed All tests now pass. I've left isRunningAgainstEmulator in the source even though there are now no callers.
1 parent 7f1050a commit 12b7397

File tree

6 files changed

+1
-19
lines changed

6 files changed

+1
-19
lines changed

Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ - (void)testCanOverwriteDataAnExistingDocumentUsingSet {
147147
}
148148

149149
- (void)testCanMergeDataWithAnExistingDocumentUsingSet {
150-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
151-
152150
FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID];
153151

154152
NSDictionary<NSString *, id> *initialData =
@@ -1039,8 +1037,6 @@ - (void)testCanTraverseCollectionAndDocumentParents {
10391037
}
10401038

10411039
- (void)testUpdateFieldsWithDots {
1042-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
1043-
10441040
FIRDocumentReference *doc = [self documentRef];
10451041

10461042
[self writeDocumentRef:doc data:@{@"a.b" : @"old", @"c.d" : @"old"}];

Firestore/Example/Tests/Integration/API/FIRFieldsTests.mm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ - (void)testFieldsWithSpecialCharsCanBeReadDirectly {
157157
}
158158

159159
- (void)testFieldsWithSpecialCharsCanBeUpdated {
160-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
161-
162160
NSDictionary<NSString *, id> *testData = [self testDottedDataNumbered:1];
163161

164162
FIRDocumentReference *doc = [self documentRef];
@@ -174,8 +172,6 @@ - (void)testFieldsWithSpecialCharsCanBeUpdated {
174172
}
175173

176174
- (void)testFieldsWithSpecialCharsCanBeUsedInQueryFilters {
177-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
178-
179175
NSDictionary<NSString *, NSDictionary<NSString *, id> *> *testDocs = @{
180176
@"1" : [self testDottedDataNumbered:300],
181177
@"2" : [self testDottedDataNumbered:100],
@@ -200,8 +196,6 @@ - (void)testFieldsWithSpecialCharsCanBeUsedInQueryFilters {
200196
}
201197

202198
- (void)testFieldsWithSpecialCharsCanBeUsedInOrderBy {
203-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
204-
205199
NSDictionary<NSString *, NSDictionary<NSString *, id> *> *testDocs = @{
206200
@"1" : [self testDottedDataNumbered:300],
207201
@"2" : [self testDottedDataNumbered:100],

Firestore/Example/Tests/Integration/API/FIRValidationTests.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ - (void)testWritesWithDirectlyNestedArraysFail {
169169
}
170170

171171
- (void)testWritesWithIndirectlyNestedArraysSucceed {
172-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return;
173-
174172
NSDictionary<NSString *, id> *data = @{@"nested-array" : @[ @1, @{@"foo" : @[ @2 ]} ]};
175173

176174
FIRDocumentReference *ref = [self documentRef];

Firestore/Example/Tests/Integration/API/FIRWriteBatchTests.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ - (void)testCannotUpdateNonexistentDocuments {
134134
}
135135

136136
- (void)testUpdateFieldsWithDots {
137-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
138-
139137
FIRDocumentReference *doc = [self documentRef];
140138

141139
XCTestExpectation *expectation = [self expectationWithDescription:@"testUpdateFieldsWithDots"];
@@ -327,8 +325,6 @@ - (void)testCanWriteTheSameDocumentMultipleTimes {
327325
}
328326

329327
- (void)testCanWriteVeryLargeBatches {
330-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return;
331-
332328
// On Android, SQLite Cursors are limited reading no more than 2 MB per row (despite being able
333329
// to write very large values). This test verifies that the local MutationQueue is not subject
334330
// to this limitation.

Firestore/Example/Tests/Integration/FSTTransactionTests.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,6 @@ - (void)testCancellationOnError {
480480
}
481481

482482
- (void)testUpdateFieldsWithDotsTransactionally {
483-
if ([FSTIntegrationTestCase isRunningAgainstEmulator]) return; // b/112104025
484-
485483
FIRDocumentReference *doc = [self documentRef];
486484

487485
XCTestExpectation *expectation =

scripts/run_firestore_emulator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
set -euo pipefail
2222

23-
VERSION='1.4.6'
23+
VERSION='1.5.0'
2424
FILENAME="cloud-firestore-emulator-v${VERSION}.jar"
2525
URL="https://storage.googleapis.com/firebase-preview-drop/emulator/${FILENAME}"
2626

0 commit comments

Comments
 (0)