@@ -151,7 +151,7 @@ class StorageAsyncAwait: StorageIntegrationCommon {
151
151
let ref = storage. reference ( withPath: " ios/public/ " + fileName)
152
152
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
153
153
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
154
- let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
154
+ let fileURL = tmpDirURL. appendingPathComponent ( #function + " hello.txt " )
155
155
try data. write ( to: fileURL, options: . atomicWrite)
156
156
let metadata = try await ref. putFileAsync ( from: fileURL)
157
157
XCTAssertEqual ( fileName, metadata. name)
@@ -182,7 +182,7 @@ class StorageAsyncAwait: StorageIntegrationCommon {
182
182
let ref = storage. reference ( withPath: " ios/public/testSimplePutFile " )
183
183
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
184
184
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
185
- let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
185
+ let fileURL = tmpDirURL. appendingPathComponent ( #function + " hello.txt " )
186
186
try data. write ( to: fileURL, options: . atomicWrite)
187
187
var uploadedBytes : Int64 = - 1
188
188
let successMetadata = try await ref. putFileAsync ( from: fileURL) { progress in
@@ -251,21 +251,21 @@ class StorageAsyncAwait: StorageIntegrationCommon {
251
251
}
252
252
253
253
func testAsyncWrite( ) async throws {
254
- let ref = storage. reference ( withPath: " ios/public/helloworld " )
254
+ let ref = storage. reference ( withPath: " ios/public/helloworld " + #function )
255
255
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
256
- let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
256
+ let fileURL = tmpDirURL. appendingPathComponent ( #function + " hello.txt " )
257
257
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
258
258
259
259
_ = try await ref. putDataAsync ( data)
260
260
let url = try await ref. writeAsync ( toFile: fileURL)
261
- XCTAssertEqual ( url. lastPathComponent, " hello.txt " )
261
+ XCTAssertEqual ( url. lastPathComponent, #function + " hello.txt " )
262
262
}
263
263
264
264
func testSimpleGetFile( ) throws {
265
265
let expectation = self . expectation ( description: #function)
266
- let ref = storage. reference ( withPath: " ios/public/helloworld " )
266
+ let ref = storage. reference ( withPath: " ios/public/helloworld " + #function )
267
267
let tmpDirURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) )
268
- let fileURL = tmpDirURL. appendingPathComponent ( " hello.txt " )
268
+ let fileURL = tmpDirURL. appendingPathComponent ( #function + " hello.txt " )
269
269
let data = try XCTUnwrap ( " Hello Swift World " . data ( using: . utf8) , " Data construction failed " )
270
270
271
271
Task {
0 commit comments