Skip to content

Commit d026ea1

Browse files
committed
namespace 1mb.dat for swift
1 parent dee9fee commit d026ea1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

FirebaseStorage/Tests/SwiftIntegration/StorageIntegration.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ class StorageIntegration: XCTestCase {
4040
signInAndWait()
4141
}
4242

43-
// if !StorageIntegration.once {
43+
if !StorageIntegration.once {
4444
let setupExpectation = expectation(description: "setUp")
4545

46-
let largeFiles = ["ios/public/1mb"]
46+
let largeFiles = ["ios/public/swift-1mb"]
4747
let emptyFiles =
4848
["ios/public/empty", "ios/public/list/a", "ios/public/list/b", "ios/public/list/prefix/c"]
4949
setupExpectation.expectedFulfillmentCount = largeFiles.count + emptyFiles.count
@@ -75,7 +75,7 @@ class StorageIntegration: XCTestCase {
7575
}
7676
waitForExpectations()
7777
StorageIntegration.once = true
78-
// }
78+
}
7979
}
8080

8181
override func tearDown() {
@@ -94,7 +94,7 @@ class StorageIntegration: XCTestCase {
9494

9595
func testGetMetadata() {
9696
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")
9898
ref.getMetadata(completion: { (metadata, error) -> Void in
9999
XCTAssertNotNil(metadata, "Metadata should not be nil")
100100
XCTAssertNil(error, "Error should be nil")
@@ -124,7 +124,7 @@ class StorageIntegration: XCTestCase {
124124
"ちかてつ": "🚇",
125125
"shinkansen": "新幹線"]
126126

127-
let ref = storage.reference(withPath: "ios/public/1mb")
127+
let ref = storage.reference(withPath: "ios/public/swift-1mb")
128128
ref.updateMetadata(meta, completion: { metadata, error in
129129
XCTAssertEqual(meta.contentType, metadata!.contentType)
130130
XCTAssertEqual(meta.customMetadata!["lol"], metadata?.customMetadata!["lol"])
@@ -356,7 +356,7 @@ class StorageIntegration: XCTestCase {
356356
func testSimpleGetData() {
357357
let expectation = self.expectation(description: #function)
358358

359-
let ref = storage.reference(withPath: "ios/public/1mb")
359+
let ref = storage.reference(withPath: "ios/public/swift-1mb")
360360
ref.getData(maxSize: 1024 * 1024, completion: { data, error in
361361
XCTAssertNotNil(data, "Data should not be nil")
362362
XCTAssertNil(error, "Error should be nil")
@@ -368,7 +368,7 @@ class StorageIntegration: XCTestCase {
368368
func testSimpleGetDataInBackgroundQueue() {
369369
let expectation = self.expectation(description: #function)
370370

371-
let ref = storage.reference(withPath: "ios/public/1mb")
371+
let ref = storage.reference(withPath: "ios/public/swift-1mb")
372372
DispatchQueue.global(qos: .background).async {
373373
ref.getData(maxSize: 1024 * 1024, completion: { data, error in
374374
XCTAssertNotNil(data, "Data should not be nil")
@@ -382,7 +382,7 @@ class StorageIntegration: XCTestCase {
382382
func testSimpleGetDataTooSmall() {
383383
let expectation = self.expectation(description: #function)
384384

385-
let ref = storage.reference(withPath: "ios/public/1mb")
385+
let ref = storage.reference(withPath: "ios/public/swift-1mb")
386386
ref.getData(maxSize: 1024, completion: { data, error in
387387
XCTAssertNil(data, "Data should be nil")
388388
XCTAssertNotNil(error, "Error should not be nil")
@@ -395,13 +395,13 @@ class StorageIntegration: XCTestCase {
395395
func testSimpleGetDownloadURL() {
396396
let expectation = self.expectation(description: #function)
397397

398-
let ref = storage.reference(withPath: "ios/public/1mb")
398+
let ref = storage.reference(withPath: "ios/public/swift-1mb")
399399

400400
// Download URL format is
401401
// "https://firebasestorage.googleapis.com/v0/b/{bucket}/o/{path}?alt=media&token={token}"
402402
let downloadURLPattern =
403403
"^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-]*$"
405405

406406
ref.downloadURL(completion: { downloadURL, error in
407407
XCTAssertNil(error, "Error should be nil")
@@ -493,7 +493,7 @@ class StorageIntegration: XCTestCase {
493493

494494
func testCancelDownload() throws {
495495
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")
497497
let tmpDirURL = URL(fileURLWithPath: NSTemporaryDirectory())
498498
let fileURL = tmpDirURL.appendingPathComponent("hello.dat")
499499
let task = ref.write(toFile: fileURL)
@@ -539,7 +539,7 @@ class StorageIntegration: XCTestCase {
539539

540540
func testUpdateMetadata2() {
541541
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")
543543

544544
let metadata = StorageMetadata()
545545
metadata.cacheControl = "cache-control"
@@ -590,7 +590,7 @@ class StorageIntegration: XCTestCase {
590590

591591
func testResumeGetFile() {
592592
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")
594594
let tmpDirURL = URL(fileURLWithPath: NSTemporaryDirectory())
595595
let fileURL = tmpDirURL.appendingPathComponent("hello.txt")
596596
let task = ref.write(toFile: fileURL)
@@ -638,7 +638,7 @@ class StorageIntegration: XCTestCase {
638638

639639
func testResumeGetFileInBackgroundQueue() {
640640
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")
642642
let tmpDirURL = URL(fileURLWithPath: NSTemporaryDirectory())
643643
let fileURL = tmpDirURL.appendingPathComponent("hello.txt")
644644
let task = ref.write(toFile: fileURL)

0 commit comments

Comments
 (0)