Skip to content

Commit

Permalink
Fix swiftlint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
CognitiveDisson committed Jul 14, 2022
1 parent dff71f8 commit be97a6a
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions Tests/XCRemoteCacheTests/Network/NetworkClientImplTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ class NetworkClientImplTests: XCTestCase {
configuration.protocolClasses = [URLProtocolStub.self]
session = URLSession(configuration: configuration)
fileManager = FileManager.default
client = NetworkClientImpl(session: session, retries: 0, retryDelay: 0, fileManager: fileManager, awsV4Signature: nil)
client = NetworkClientImpl(
session: session,
retries: 0,
retryDelay: 0,
fileManager: fileManager,
awsV4Signature: nil
)
}

override func tearDown() {
Expand Down Expand Up @@ -141,7 +147,13 @@ class NetworkClientImplTests: XCTestCase {
}

func testUploadFilureWith400Retries() throws {
client = NetworkClientImpl(session: session, retries: 2, retryDelay: 0.1, fileManager: fileManager, awsV4Signature: nil)
client = NetworkClientImpl(
session: session,
retries: 2,
retryDelay: 0,
fileManager: fileManager,
awsV4Signature: nil
)
responses[url] = .success(failureResponse, Data())
_ = try waitForResponse({ client.upload(fileURL, as: url, completion: $0) }, timeout: 0.5)

Expand All @@ -153,7 +165,13 @@ class NetworkClientImplTests: XCTestCase {
}

func testUploadSuccessDoesntRetry() throws {
client = NetworkClientImpl(session: session, retries: 0, retryDelay: 0.1, fileManager: fileManager, awsV4Signature: nil)
client = NetworkClientImpl(
session: session,
retries: 0,
retryDelay: 0,
fileManager: fileManager,
awsV4Signature: nil
)
responses[url] = .success(successResponse, Data())
_ = try waitForResponse { client.upload(fileURL, as: url, completion: $0) }

Expand Down Expand Up @@ -208,7 +226,13 @@ class NetworkClientImplTests: XCTestCase {
service: "iam",
date: Date(timeIntervalSince1970: 1_440_938_160)
)
client = NetworkClientImpl(session: session, retries: 0, retryDelay: 0.1, fileManager: fileManager, awsV4Signature: signature)
client = NetworkClientImpl(
session: session,
retries: 0,
retryDelay: 0,
fileManager: fileManager,
awsV4Signature: signature
)
responses[url] = .success(successResponse, Data())
_ = try waitForResponse { client.fetch(url, completion: $0) }

Expand Down

0 comments on commit be97a6a

Please sign in to comment.