@@ -40,10 +40,10 @@ class StorageIntegration: XCTestCase {
40
40
signInAndWait ( )
41
41
}
42
42
43
- // if !StorageIntegration.once {
43
+ if !StorageIntegration. once {
44
44
let setupExpectation = expectation ( description: " setUp " )
45
45
46
- let largeFiles = [ " ios/public/1mb " ]
46
+ let largeFiles = [ " ios/public/swift- 1mb " ]
47
47
let emptyFiles =
48
48
[ " ios/public/empty " , " ios/public/list/a " , " ios/public/list/b " , " ios/public/list/prefix/c " ]
49
49
setupExpectation. expectedFulfillmentCount = largeFiles. count + emptyFiles. count
@@ -75,7 +75,7 @@ class StorageIntegration: XCTestCase {
75
75
}
76
76
waitForExpectations ( )
77
77
StorageIntegration . once = true
78
- // }
78
+ }
79
79
}
80
80
81
81
override func tearDown( ) {
@@ -94,7 +94,7 @@ class StorageIntegration: XCTestCase {
94
94
95
95
func testGetMetadata( ) {
96
96
let expectation = self . expectation ( description: #function)
97
- let ref = storage. reference ( ) . child ( " ios/public/1mb " )
97
+ let ref = storage. reference ( ) . child ( " ios/public/swift- 1mb " )
98
98
ref. getMetadata ( completion: { ( metadata, error) -> Void in
99
99
XCTAssertNotNil ( metadata, " Metadata should not be nil " )
100
100
XCTAssertNil ( error, " Error should be nil " )
@@ -124,7 +124,7 @@ class StorageIntegration: XCTestCase {
124
124
" ちかてつ " : " 🚇 " ,
125
125
" shinkansen " : " 新幹線 " ]
126
126
127
- let ref = storage. reference ( withPath: " ios/public/1mb " )
127
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
128
128
ref. updateMetadata ( meta, completion: { metadata, error in
129
129
XCTAssertEqual ( meta. contentType, metadata!. contentType)
130
130
XCTAssertEqual ( meta. customMetadata![ " lol " ] , metadata? . customMetadata![ " lol " ] )
@@ -356,7 +356,7 @@ class StorageIntegration: XCTestCase {
356
356
func testSimpleGetData( ) {
357
357
let expectation = self . expectation ( description: #function)
358
358
359
- let ref = storage. reference ( withPath: " ios/public/1mb " )
359
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
360
360
ref. getData ( maxSize: 1024 * 1024 , completion: { data, error in
361
361
XCTAssertNotNil ( data, " Data should not be nil " )
362
362
XCTAssertNil ( error, " Error should be nil " )
@@ -368,7 +368,7 @@ class StorageIntegration: XCTestCase {
368
368
func testSimpleGetDataInBackgroundQueue( ) {
369
369
let expectation = self . expectation ( description: #function)
370
370
371
- let ref = storage. reference ( withPath: " ios/public/1mb " )
371
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
372
372
DispatchQueue . global ( qos: . background) . async {
373
373
ref. getData ( maxSize: 1024 * 1024 , completion: { data, error in
374
374
XCTAssertNotNil ( data, " Data should not be nil " )
@@ -382,7 +382,7 @@ class StorageIntegration: XCTestCase {
382
382
func testSimpleGetDataTooSmall( ) {
383
383
let expectation = self . expectation ( description: #function)
384
384
385
- let ref = storage. reference ( withPath: " ios/public/1mb " )
385
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
386
386
ref. getData ( maxSize: 1024 , completion: { data, error in
387
387
XCTAssertNil ( data, " Data should be nil " )
388
388
XCTAssertNotNil ( error, " Error should not be nil " )
@@ -395,13 +395,13 @@ class StorageIntegration: XCTestCase {
395
395
func testSimpleGetDownloadURL( ) {
396
396
let expectation = self . expectation ( description: #function)
397
397
398
- let ref = storage. reference ( withPath: " ios/public/1mb " )
398
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
399
399
400
400
// Download URL format is
401
401
// "https://firebasestorage.googleapis.com/v0/b/{bucket}/o/{path}?alt=media&token={token}"
402
402
let downloadURLPattern =
403
403
" ^https: \\ / \\ /firebasestorage.googleapis.com \\ /v0 \\ /b \\ /[^ \\ /]* \\ /o \\ / " +
404
- " ios%2Fpublic%2F1mb \\ ?alt=media&token=[a-z0-9-]*$ "
404
+ " ios%2Fpublic%2Fswift-1mb \\ ?alt=media&token=[a-z0-9-]*$ "
405
405
406
406
ref. downloadURL ( completion: { downloadURL, error in
407
407
XCTAssertNil ( error, " Error should be nil " )
@@ -493,7 +493,7 @@ class StorageIntegration: XCTestCase {
493
493
494
494
func testCancelDownload( ) throws {
495
495
let expectation = self . expectation ( description: #function)
496
- let ref = storage. reference ( withPath: " ios/public/1mb " )
496
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
497
497
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
498
498
let fileURL = tmpDirURL. appendingPathComponent ( " hello.dat " )
499
499
let task = ref. write ( toFile: fileURL)
@@ -539,7 +539,7 @@ class StorageIntegration: XCTestCase {
539
539
540
540
func testUpdateMetadata2( ) {
541
541
let expectation = self . expectation ( description: #function)
542
- let ref = storage. reference ( withPath: " ios/public/1mb " )
542
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
543
543
544
544
let metadata = StorageMetadata ( )
545
545
metadata. cacheControl = " cache-control "
@@ -590,7 +590,7 @@ class StorageIntegration: XCTestCase {
590
590
591
591
func testResumeGetFile( ) {
592
592
let expectation = self . expectation ( description: #function)
593
- let ref = storage. reference ( withPath: " ios/public/1mb " )
593
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
594
594
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
595
595
let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
596
596
let task = ref. write ( toFile: fileURL)
@@ -638,7 +638,7 @@ class StorageIntegration: XCTestCase {
638
638
639
639
func testResumeGetFileInBackgroundQueue( ) {
640
640
let expectation = self . expectation ( description: #function)
641
- let ref = storage. reference ( withPath: " ios/public/1mb " )
641
+ let ref = storage. reference ( withPath: " ios/public/swift- 1mb " )
642
642
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
643
643
let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
644
644
let task = ref. write ( toFile: fileURL)
0 commit comments