File tree 9 files changed +37
-28
lines changed
Examples/BackgroundTasks/Sources
AWSLambdaRuntime/Vendored
Tests/AWSLambdaRuntimeCoreTests
9 files changed +37
-28
lines changed Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
import AWSLambdaRuntime
16
+
16
17
#if canImport(FoundationEssentials)
17
18
import FoundationEssentials
18
19
#else
Original file line number Diff line number Diff line change 26
26
//
27
27
//===----------------------------------------------------------------------===//
28
28
29
+ import NIOCore
30
+
29
31
#if canImport(FoundationEssentials)
30
32
import FoundationEssentials
31
33
#else
32
34
import Foundation
33
35
#endif
34
- import NIOCore
35
36
36
37
// This is NIO's `NIOFoundationCompat` module which at the moment only adds `ByteBuffer` utility methods
37
38
// for Foundation's `Data` type.
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
+ import Logging
16
+ import NIOConcurrencyHelpers
17
+ import NIOCore
18
+
15
19
#if canImport(FoundationEssentials)
16
20
import FoundationEssentials
17
21
#else
18
22
import Foundation
19
23
#endif
20
- import Logging
21
- import NIOConcurrencyHelpers
22
- import NIOCore
23
24
24
25
// We need `@unchecked` Sendable here, as `NIOLockedValueBox` does not understand `sending` today.
25
26
// We don't want to use `NIOLockedValueBox` here anyway. We would love to use Mutex here, but this
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
+ import Dispatch
16
+ import NIOCore
17
+ import NIOHTTP1
18
+ import NIOPosix
19
+
15
20
#if canImport(FoundationEssentials)
16
21
import FoundationEssentials
17
22
#else
18
23
import Foundation
19
24
#endif
20
- import NIOCore
21
- import NIOHTTP1
22
- import NIOPosix
23
- import Dispatch
24
25
25
26
struct MockServer {
26
27
private let group : EventLoopGroup
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
+ import NIOHTTP1
16
+ import Testing
17
+
18
+ @testable import AWSLambdaRuntimeCore
19
+
15
20
#if canImport(FoundationEssentials)
16
21
import FoundationEssentials
17
22
#else
18
23
import Foundation
19
24
#endif
20
- import NIOHTTP1
21
- import Testing
22
-
23
- @testable import AWSLambdaRuntimeCore
24
25
25
26
@Suite
26
27
struct InvocationTest {
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
import AWSLambdaRuntimeCore
16
+ import Logging
17
+ import NIOCore
18
+
16
19
#if canImport(FoundationEssentials)
17
20
import FoundationEssentials
18
21
#else
19
22
import Foundation
20
23
#endif
21
- import Logging
22
- import NIOCore
23
24
24
25
struct LambdaMockWriter : LambdaRuntimeClientResponseStreamWriter {
25
26
var underlying : LambdaMockClient
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
+ import NIOCore
16
+ import Testing
17
+
18
+ @testable import AWSLambdaRuntimeCore
19
+
15
20
#if canImport(FoundationEssentials)
16
21
import FoundationEssentials
17
22
#else
18
23
import Foundation
19
24
#endif
20
- import NIOCore
21
- import Testing
22
-
23
- @testable import AWSLambdaRuntimeCore
24
25
25
26
@Suite ( " LambdaRequestID tests " )
26
27
struct LambdaRequestIDTest {
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
- #if canImport(FoundationEssentials)
16
- import FoundationEssentials
17
- #else
18
- import Foundation
19
- #endif
20
15
import Logging
21
16
import NIOCore
22
17
import Testing
23
18
24
19
@testable import AWSLambdaRuntimeCore
25
20
21
+ #if canImport(FoundationEssentials)
22
+ import FoundationEssentials
23
+ #else
24
+ import Foundation
25
+ #endif
26
+
26
27
@Suite
27
28
struct LambdaRunLoopTests {
28
29
struct MockEchoHandler : StreamingLambdaHandler {
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
- #if canImport(FoundationEssentials)
16
- import FoundationEssentials
17
- #else
18
- import Foundation
19
- #endif
20
15
import Logging
21
16
import NIOCore
22
17
import NIOHTTP1
23
18
import NIOPosix
24
19
25
20
@testable import AWSLambdaRuntimeCore
26
21
22
+ #if canImport(FoundationEssentials)
23
+ import FoundationEssentials
24
+ #else
25
+ import Foundation
26
+ #endif
27
+
27
28
func withMockServer< Result> (
28
29
behaviour: some LambdaServerBehavior ,
29
30
port: Int = 0 ,
You can’t perform that action at this time.
0 commit comments