Skip to content

Commit 9d8c1e2

Browse files
committed
Fix format
1 parent 7099c48 commit 9d8c1e2

File tree

3 files changed

+46
-12
lines changed

3 files changed

+46
-12
lines changed

Tests/AWSLambdaRuntimeCoreTests/LambdaHandlerTest.swift

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ class LambdaHandlerTest: XCTestCase {
3434
}
3535

3636
let maxTimes = Int.random(in: 10...20)
37-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
37+
let configuration = LambdaConfiguration(
38+
lifecycle: .init(maxTimes: maxTimes),
39+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
40+
)
3841
let result = Lambda.run(configuration: configuration, handlerType: TestBootstrapHandler.self)
3942
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
4043
}
@@ -60,7 +63,10 @@ class LambdaHandlerTest: XCTestCase {
6063
}
6164

6265
let maxTimes = Int.random(in: 10...20)
63-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
66+
let configuration = LambdaConfiguration(
67+
lifecycle: .init(maxTimes: maxTimes),
68+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
69+
)
6470
let result = Lambda.run(configuration: configuration, handlerType: TestBootstrapHandler.self)
6571
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
6672
}
@@ -89,7 +95,10 @@ class LambdaHandlerTest: XCTestCase {
8995
}
9096

9197
let maxTimes = Int.random(in: 10...20)
92-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
98+
let configuration = LambdaConfiguration(
99+
lifecycle: .init(maxTimes: maxTimes),
100+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
101+
)
93102
let result = Lambda.run(configuration: configuration, handlerType: TestBootstrapHandler.self)
94103
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
95104
}
@@ -116,7 +125,10 @@ class LambdaHandlerTest: XCTestCase {
116125
}
117126

118127
let maxTimes = Int.random(in: 10...20)
119-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
128+
let configuration = LambdaConfiguration(
129+
lifecycle: .init(maxTimes: maxTimes),
130+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
131+
)
120132
let result = Lambda.run(configuration: configuration, handlerType: TestBootstrapHandler.self)
121133
assertLambdaRuntimeResult(result, shouldFailWithError: TestError("kaboom"))
122134
}
@@ -135,7 +147,10 @@ class LambdaHandlerTest: XCTestCase {
135147
}
136148

137149
let maxTimes = Int.random(in: 1...10)
138-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
150+
let configuration = LambdaConfiguration(
151+
lifecycle: .init(maxTimes: maxTimes),
152+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
153+
)
139154
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
140155
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
141156
}
@@ -152,7 +167,10 @@ class LambdaHandlerTest: XCTestCase {
152167
}
153168

154169
let maxTimes = Int.random(in: 1...10)
155-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
170+
let configuration = LambdaConfiguration(
171+
lifecycle: .init(maxTimes: maxTimes),
172+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
173+
)
156174

157175
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
158176
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
@@ -172,7 +190,10 @@ class LambdaHandlerTest: XCTestCase {
172190
}
173191

174192
let maxTimes = Int.random(in: 1...10)
175-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
193+
let configuration = LambdaConfiguration(
194+
lifecycle: .init(maxTimes: maxTimes),
195+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
196+
)
176197
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
177198
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
178199
}
@@ -197,7 +218,10 @@ class LambdaHandlerTest: XCTestCase {
197218
}
198219

199220
let maxTimes = Int.random(in: 1...10)
200-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
221+
let configuration = LambdaConfiguration(
222+
lifecycle: .init(maxTimes: maxTimes),
223+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
224+
)
201225
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
202226
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
203227
}
@@ -220,7 +244,10 @@ class LambdaHandlerTest: XCTestCase {
220244
}
221245

222246
let maxTimes = Int.random(in: 1...10)
223-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
247+
let configuration = LambdaConfiguration(
248+
lifecycle: .init(maxTimes: maxTimes),
249+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
250+
)
224251
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
225252
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
226253
}
@@ -243,7 +270,10 @@ class LambdaHandlerTest: XCTestCase {
243270
}
244271

245272
let maxTimes = Int.random(in: 1...10)
246-
let configuration = LambdaConfiguration(lifecycle: .init(maxTimes: maxTimes), runtimeEngine: .init(address: "127.0.0.1:\(port)"))
273+
let configuration = LambdaConfiguration(
274+
lifecycle: .init(maxTimes: maxTimes),
275+
runtimeEngine: .init(address: "127.0.0.1:\(port)")
276+
)
247277
let result = Lambda.run(configuration: configuration, handlerType: Handler.self)
248278
assertLambdaRuntimeResult(result, shouldHaveRun: maxTimes)
249279
}

Tests/AWSLambdaRuntimeCoreTests/LambdaTest.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ class LambdaTest: XCTestCase {
279279
defer { XCTAssertNoThrow(try server.stop().wait()) }
280280

281281
let logger = Logger(label: "TestLogger")
282-
let configuration = LambdaConfiguration(runtimeEngine: .init(address: "127.0.0.1:\(port)", requestTimeout: .milliseconds(100)))
282+
let configuration = LambdaConfiguration(
283+
runtimeEngine: .init(address: "127.0.0.1:\(port)", requestTimeout: .milliseconds(100))
284+
)
283285

284286
let handler1 = Handler()
285287
let task = Task.detached {

Tests/AWSLambdaRuntimeCoreTests/Utils.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ func runLambda(
8484
let logger = Logger(label: "TestLogger")
8585
let server = MockLambdaServer(behavior: behavior, port: 0)
8686
let port = try server.start().wait()
87-
let configuration = LambdaConfiguration(runtimeEngine: .init(address: "127.0.0.1:\(port)", requestTimeout: .milliseconds(100)))
87+
let configuration = LambdaConfiguration(
88+
runtimeEngine: .init(address: "127.0.0.1:\(port)", requestTimeout: .milliseconds(100))
89+
)
8890
let terminator = LambdaTerminator()
8991
let runner = LambdaRunner(eventLoop: eventLoopGroup.next(), configuration: configuration)
9092
defer { XCTAssertNoThrow(try server.stop().wait()) }

0 commit comments

Comments
 (0)