@@ -36,9 +36,9 @@ class LambdaRuntimeClientTest: XCTestCase {
36
36
XCTAssertEqual ( behavior. state, 1 )
37
37
}
38
38
39
- func testGetWorkServerInternalError ( ) {
39
+ func testGetInvocationServerInternalError ( ) {
40
40
struct Behavior : LambdaServerBehavior {
41
- func getWork ( ) -> GetWorkResult {
41
+ func getInvocation ( ) -> GetInvocationResult {
42
42
. failure( . internalServerError)
43
43
}
44
44
@@ -62,9 +62,9 @@ class LambdaRuntimeClientTest: XCTestCase {
62
62
}
63
63
}
64
64
65
- func testGetWorkServerNoBodyError ( ) {
65
+ func testGetInvocationServerNoBodyError ( ) {
66
66
struct Behavior : LambdaServerBehavior {
67
- func getWork ( ) -> GetWorkResult {
67
+ func getInvocation ( ) -> GetInvocationResult {
68
68
. success( ( " 1 " , " " ) )
69
69
}
70
70
@@ -88,9 +88,9 @@ class LambdaRuntimeClientTest: XCTestCase {
88
88
}
89
89
}
90
90
91
- func testGetWorkServerMissingHeaderRequestIDError ( ) {
91
+ func testGetInvocationServerMissingHeaderRequestIDError ( ) {
92
92
struct Behavior : LambdaServerBehavior {
93
- func getWork ( ) -> GetWorkResult {
93
+ func getInvocation ( ) -> GetInvocationResult {
94
94
// no request id -> no context
95
95
. success( ( " " , " hello " ) )
96
96
}
@@ -117,7 +117,7 @@ class LambdaRuntimeClientTest: XCTestCase {
117
117
118
118
func testProcessResponseInternalServerError( ) {
119
119
struct Behavior : LambdaServerBehavior {
120
- func getWork ( ) -> GetWorkResult {
120
+ func getInvocation ( ) -> GetInvocationResult {
121
121
. success( ( requestId: " 1 " , payload: " payload " ) )
122
122
}
123
123
@@ -142,7 +142,7 @@ class LambdaRuntimeClientTest: XCTestCase {
142
142
143
143
func testProcessErrorInternalServerError( ) {
144
144
struct Behavior : LambdaServerBehavior {
145
- func getWork ( ) -> GetWorkResult {
145
+ func getInvocation ( ) -> GetInvocationResult {
146
146
. success( ( requestId: " 1 " , payload: " payload " ) )
147
147
}
148
148
@@ -167,8 +167,8 @@ class LambdaRuntimeClientTest: XCTestCase {
167
167
168
168
func testProcessInitErrorOnBootstrapFailure( ) {
169
169
struct Behavior : LambdaServerBehavior {
170
- func getWork ( ) -> GetWorkResult {
171
- XCTFail ( " should not get work " )
170
+ func getInvocation ( ) -> GetInvocationResult {
171
+ XCTFail ( " should not get invocation " )
172
172
return . failure( . internalServerError)
173
173
}
174
174
@@ -217,7 +217,7 @@ class LambdaRuntimeClientTest: XCTestCase {
217
217
return . success( ( ) )
218
218
}
219
219
220
- func getWork ( ) -> GetWorkResult {
220
+ func getInvocation ( ) -> GetInvocationResult {
221
221
self . state += 2
222
222
return . success( ( " 1 " , " hello " ) )
223
223
}
0 commit comments