31
31
#include < aws/lambda/model/GetEventSourceMappingRequest.h>
32
32
#include < aws/lambda/model/UpdateEventSourceMappingRequest.h>
33
33
#include < aws/lambda/model/DeleteEventSourceMappingRequest.h>
34
- #include < aws/lambda/model/ResourceNotFoundException.h>
35
34
36
35
#include < aws/kinesis/KinesisClient.h>
37
36
#include < aws/kinesis/model/CreateStreamRequest.h>
@@ -247,14 +246,14 @@ class FunctionTest : public ::testing::Test {
247
246
248
247
functionCode.SetZipFile (Aws::Utils::ByteBuffer ((unsigned char *)buffer.str ().c_str (), buffer.str ().length ()));
249
248
createFunctionRequest.SetCode (functionCode);
250
- createFunctionRequest.SetRuntime (Aws::Lambda::Model::Runtime::nodejs12_x );
249
+ createFunctionRequest.SetRuntime (Aws::Lambda::Model::Runtime::nodejs16_x );
251
250
252
251
CreateFunctionOutcome createFunctionOutcome = m_client->CreateFunction (createFunctionRequest);
253
252
AWS_ASSERT_SUCCESS (createFunctionOutcome);
254
253
ASSERT_EQ (functionName,createFunctionOutcome.GetResult ().GetFunctionName ());
255
254
ASSERT_EQ (" test.handler" ,createFunctionOutcome.GetResult ().GetHandler ());
256
255
ASSERT_EQ (roleARN,createFunctionOutcome.GetResult ().GetRole ());
257
- ASSERT_EQ (Aws::Lambda::Model::Runtime::nodejs12_x , createFunctionOutcome.GetResult ().GetRuntime ());
256
+ ASSERT_EQ (Aws::Lambda::Model::Runtime::nodejs16_x , createFunctionOutcome.GetResult ().GetRuntime ());
258
257
functionArnMapping[functionName] = createFunctionOutcome.GetResult ().GetFunctionArn ();
259
258
260
259
WaitForFunctionStatus (functionName, Aws::Lambda::Model::State::Active);
@@ -316,7 +315,7 @@ TEST_F(FunctionTest, TestGetFunction)
316
315
AWS_EXPECT_SUCCESS (getFunctionOutcome);
317
316
318
317
GetFunctionResult getFunctionResult = getFunctionOutcome.GetResult ();
319
- EXPECT_EQ (Runtime::nodejs12_x , getFunctionResult.GetConfiguration ().GetRuntime ());
318
+ EXPECT_EQ (Runtime::nodejs16_x , getFunctionResult.GetConfiguration ().GetRuntime ());
320
319
EXPECT_EQ (" test.handler" ,getFunctionResult.GetConfiguration ().GetHandler ());
321
320
EXPECT_EQ (simpleFunctionName,getFunctionResult.GetConfiguration ().GetFunctionName ());
322
321
// Just see that is looks like an aws url
@@ -334,7 +333,7 @@ TEST_F(FunctionTest, TestGetFunctionConfiguration)
334
333
AWS_EXPECT_SUCCESS (getFunctionConfigurationOutcome);
335
334
336
335
GetFunctionConfigurationResult getFunctionConfigurationResult = getFunctionConfigurationOutcome.GetResult ();
337
- EXPECT_EQ (Runtime::nodejs12_x , getFunctionConfigurationResult.GetRuntime ());
336
+ EXPECT_EQ (Runtime::nodejs16_x , getFunctionConfigurationResult.GetRuntime ());
338
337
EXPECT_EQ (" test.handler" ,getFunctionConfigurationResult.GetHandler ());
339
338
EXPECT_EQ (simpleFunctionName,getFunctionConfigurationResult.GetFunctionName ());
340
339
}
@@ -490,7 +489,6 @@ TEST_F(FunctionTest, TestPermissions)
490
489
if (!getRemovedPolicyOutcome.IsSuccess ())
491
490
{
492
491
EXPECT_EQ (LambdaErrors::RESOURCE_NOT_FOUND, getRemovedPolicyOutcome.GetError ().GetErrorType ());
493
- EXPECT_STREQ (" User" , getRemovedPolicyOutcome.GetError <ResourceNotFoundException>().GetType ().c_str ());
494
492
}
495
493
// Now we should get an empty policy a GetPolicy because we just removed it
496
494
else
0 commit comments