Skip to content

Commit 94262b3

Browse files
authored
Storage Integration Tests to Swift (#5197)
1 parent a436ef8 commit 94262b3

File tree

4 files changed

+650
-5
lines changed

4 files changed

+650
-5
lines changed

FirebaseStorage.podspec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,12 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
5353
int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
5454
'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist'
5555
end
56+
57+
s.test_spec 'swift-integration' do |swift_int_tests|
58+
swift_int_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
59+
swift_int_tests.source_files = 'FirebaseStorage/Tests/SwiftIntegration/*.swift'
60+
swift_int_tests.requires_app_host = true
61+
swift_int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
62+
'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist'
63+
end
5664
end

FirebaseStorage/Tests/Integration/FIRStorageIntegrationTests.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ - (void)testUnauthenticatedSimpleGetDownloadURL {
496496

497497
- (void)testUnauthenticatedSimpleGetFile {
498498
XCTestExpectation *expectation =
499-
[self expectationWithDescription:@"testUnauthenticatedSimpleGetData"];
499+
[self expectationWithDescription:@"testUnauthenticatedSimpleGetFile"];
500500

501501
FIRStorageReference *ref = [self.storage referenceWithPath:@"ios/public/helloworld"];
502502

@@ -529,7 +529,6 @@ - (void)testUnauthenticatedSimpleGetFile {
529529
[task observeStatus:FIRStorageTaskStatusFailure
530530
handler:^(FIRStorageTaskSnapshot *snapshot) {
531531
XCTAssertNil(snapshot.error);
532-
[expectation fulfill];
533532
}];
534533
}];
535534

@@ -583,9 +582,7 @@ - (void)assertMetadataNil:(FIRStorageMetadata *)actualMetadata {
583582
XCTAssertNil(actualMetadata.contentLanguage);
584583
XCTAssertNil(actualMetadata.contentType);
585584
XCTAssertTrue([actualMetadata.md5Hash length] == 24);
586-
XCTAssertNil([actualMetadata.customMetadata objectForKey:@"a"]);
587-
XCTAssertNil([actualMetadata.customMetadata objectForKey:@"c"]);
588-
XCTAssertNil([actualMetadata.customMetadata objectForKey:@"f"]);
585+
XCTAssertNil(actualMetadata.customMetadata);
589586
}
590587

591588
- (void)testUpdateMetadata {

0 commit comments

Comments
 (0)