@@ -49,14 +49,14 @@ class StorageIntegration: XCTestCase {
49
49
50
50
for largeFile in largeFiles {
51
51
let ref = storage. reference ( ) . child ( largeFile)
52
- _ = ref. putData ( data) { result in
52
+ ref. putData ( data) { result in
53
53
self . assertResultSuccess ( result)
54
54
setupExpectation. fulfill ( )
55
55
}
56
56
}
57
57
for emptyFile in emptyFiles {
58
58
let ref = storage. reference ( ) . child ( emptyFile)
59
- _ = ref. putData ( data) { result in
59
+ ref. putData ( data) { result in
60
60
self . assertResultSuccess ( result)
61
61
setupExpectation. fulfill ( )
62
62
}
@@ -114,7 +114,7 @@ class StorageIntegration: XCTestCase {
114
114
let expectation = self . expectation ( description: #function)
115
115
let ref = storage. reference ( withPath: " ios/public/fileToDelete " )
116
116
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
117
- _ = ref. putData ( data) { result in
117
+ ref. putData ( data) { result in
118
118
self . assertResultSuccess ( result)
119
119
ref. delete ( ) { error in
120
120
XCTAssertNil ( error, " Error should be nil " )
@@ -128,7 +128,7 @@ class StorageIntegration: XCTestCase {
128
128
let expectation = self . expectation ( description: #function)
129
129
let ref = storage. reference ( withPath: " ios/public/fileToDelete " )
130
130
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
131
- _ = ref. putData ( data) { result in
131
+ ref. putData ( data) { result in
132
132
self . assertResultSuccess ( result)
133
133
ref. delete ( completion: nil )
134
134
expectation. fulfill ( )
@@ -140,7 +140,7 @@ class StorageIntegration: XCTestCase {
140
140
let expectation = self . expectation ( description: #function)
141
141
let ref = storage. reference ( withPath: " ios/public/testBytesUpload " )
142
142
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
143
- _ = ref. putData ( data) { result in
143
+ ref. putData ( data) { result in
144
144
self . assertResultSuccess ( result)
145
145
expectation. fulfill ( )
146
146
}
@@ -151,7 +151,7 @@ class StorageIntegration: XCTestCase {
151
151
let expectation = self . expectation ( description: #function)
152
152
let ref = storage. reference ( withPath: " ios/public/-._~!$'()*,=:@&+; " )
153
153
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
154
- _ = ref. putData ( data) { result in
154
+ ref. putData ( data) { result in
155
155
self . assertResultSuccess ( result)
156
156
expectation. fulfill ( )
157
157
}
@@ -163,7 +163,7 @@ class StorageIntegration: XCTestCase {
163
163
let ref = storage. reference ( withPath: " ios/public/testBytesUpload " )
164
164
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
165
165
DispatchQueue . global ( qos: . background) . async {
166
- _ = ref. putData ( data) { result in
166
+ ref. putData ( data) { result in
167
167
self . assertResultSuccess ( result)
168
168
expectation. fulfill ( )
169
169
}
@@ -175,7 +175,7 @@ class StorageIntegration: XCTestCase {
175
175
let expectation = self . expectation ( description: #function)
176
176
let ref = storage. reference ( withPath: " ios/public/testUnauthenticatedSimplePutEmptyData " )
177
177
let data = Data ( )
178
- _ = ref. putData ( data) { result in
178
+ ref. putData ( data) { result in
179
179
self . assertResultSuccess ( result)
180
180
expectation. fulfill ( )
181
181
}
@@ -186,7 +186,7 @@ class StorageIntegration: XCTestCase {
186
186
let expectation = self . expectation ( description: #function)
187
187
let ref = storage. reference ( withPath: " ios/private/secretfile.txt " )
188
188
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
189
- _ = ref. putData ( data) { result in
189
+ ref. putData ( data) { result in
190
190
switch result {
191
191
case . success:
192
192
XCTFail ( " Unexpected success from unauthorized putData " )
@@ -202,7 +202,7 @@ class StorageIntegration: XCTestCase {
202
202
let expectation = self . expectation ( description: #function)
203
203
let ref = storage. reference ( withPath: " ios/private/secretfile.txt " )
204
204
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
205
- _ = ref. putData ( data) { result in
205
+ ref. putData ( data) { result in
206
206
do {
207
207
try _ = result. get ( ) // .failure will throw
208
208
} catch {
@@ -257,7 +257,7 @@ class StorageIntegration: XCTestCase {
257
257
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
258
258
let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
259
259
try data. write ( to: fileURL, options: . atomicWrite)
260
- _ = ref. putFile ( from: fileURL) { result in
260
+ ref. putFile ( from: fileURL) { result in
261
261
switch result {
262
262
case let . success( metadata) :
263
263
XCTAssertEqual ( fileName, metadata. name)
@@ -278,7 +278,7 @@ class StorageIntegration: XCTestCase {
278
278
let ref = storage. reference ( withPath: " ios/public/testUnauthenticatedSimplePutDataNoMetadata " )
279
279
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
280
280
281
- _ = ref. putData ( data) { result in
281
+ ref. putData ( data) { result in
282
282
self . assertResultSuccess ( result)
283
283
expectation. fulfill ( )
284
284
}
@@ -294,7 +294,7 @@ class StorageIntegration: XCTestCase {
294
294
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
295
295
let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
296
296
try data. write ( to: fileURL, options: . atomicWrite)
297
- _ = ref. putFile ( from: fileURL) { result in
297
+ ref. putFile ( from: fileURL) { result in
298
298
self . assertResultSuccess ( result)
299
299
expectation. fulfill ( )
300
300
}
@@ -305,7 +305,7 @@ class StorageIntegration: XCTestCase {
305
305
let expectation = self . expectation ( description: #function)
306
306
307
307
let ref = storage. reference ( withPath: " ios/public/1mb " )
308
- _ = ref. getData ( maxSize: 1024 * 1024 ) { result in
308
+ ref. getData ( maxSize: 1024 * 1024 ) { result in
309
309
self . assertResultSuccess ( result)
310
310
expectation. fulfill ( )
311
311
}
@@ -317,7 +317,7 @@ class StorageIntegration: XCTestCase {
317
317
318
318
let ref = storage. reference ( withPath: " ios/public/1mb " )
319
319
DispatchQueue . global ( qos: . background) . async {
320
- _ = ref. getData ( maxSize: 1024 * 1024 ) { result in
320
+ ref. getData ( maxSize: 1024 * 1024 ) { result in
321
321
self . assertResultSuccess ( result)
322
322
expectation. fulfill ( )
323
323
}
@@ -329,7 +329,7 @@ class StorageIntegration: XCTestCase {
329
329
let expectation = self . expectation ( description: #function)
330
330
331
331
let ref = storage. reference ( withPath: " ios/public/1mb " )
332
- _ = ref. getData ( maxSize: 1024 ) { result in
332
+ ref. getData ( maxSize: 1024 ) { result in
333
333
switch result {
334
334
case . success:
335
335
XCTFail ( " Unexpected success from getData too small " )
@@ -379,7 +379,7 @@ class StorageIntegration: XCTestCase {
379
379
let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
380
380
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
381
381
382
- _ = ref. putData ( data) { result in
382
+ ref. putData ( data) { result in
383
383
switch result {
384
384
case . success:
385
385
let task = ref. write ( toFile: fileURL)
0 commit comments