Skip to content

Commit c241081

Browse files
committed
update test
1 parent 810f1c9 commit c241081

5 files changed

Lines changed: 44 additions & 6 deletions

File tree

Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/WriterTests/ScheduleEventsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void VerifyScheduleEventAttributes_AreCorrectlyApplied(CloudFormationTemp
4949
Assert.Equal("rate(5 minutes)", templateWriter.GetToken<string>($"{eventPropertiesPath}.Schedule"));
5050
Assert.Equal("Process every 5 minutes", templateWriter.GetToken<string>($"{eventPropertiesPath}.Description"));
5151
Assert.Equal("{\"key\": \"value\"}", templateWriter.GetToken<string>($"{eventPropertiesPath}.Input"));
52-
Assert.Equal(true, templateWriter.GetToken<bool>($"{eventPropertiesPath}.Enabled"));
52+
Assert.True(templateWriter.GetToken<bool>($"{eventPropertiesPath}.Enabled"));
5353
}
5454

5555
[Theory]

Libraries/test/TestServerlessApp.IntegrationTests/TestServerlessApp.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.1.99" />
1111
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.513.1" />
1212
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.502.58" />
13-
<PackageReference Include="AWSSDK.CloudWatchEvents" Version="3.7.1.99" />
13+
<PackageReference Include="AWSSDK.CloudWatchEvents" Version="3.7.501.54" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1515
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
1616
<PackageReference Include="xunit" Version="2.4.1" />

Libraries/test/TestServerlessApp/ScheduledProcessing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace TestServerlessApp
1010
{
1111
public class ScheduledProcessing
1212
{
13-
[LambdaFunction(ResourceName = "ScheduledHandler", Policies = "AWSLambdaBasicExecutionRole")]
13+
[LambdaFunction(ResourceName = "ScheduledHandler", Policies = "AWSLambdaBasicExecutionRole", PackageType = LambdaPackageType.Image)]
1414
[ScheduleEvent("rate(5 minutes)", ResourceName = "FiveMinuteSchedule", Description = "Runs every 5 minutes")]
1515
public void HandleSchedule(ScheduledEvent evnt, ILambdaContext lambdaContext)
1616
{

Libraries/test/TestServerlessApp/aws-lambda-tools-defaults.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"template": "serverless.template",
1414
"template-parameters": "",
1515
"docker-host-build-output-dir": "./bin/Release/lambda-publish",
16-
"s3-bucket" : "test-serverless-app-a14f34c1",
17-
"stack-name" : "test-serverless-app-a14f34c1",
16+
"s3-bucket" : "test-serverless-app-8e3588ee",
17+
"stack-name" : "test-serverless-app-8e3588ee",
1818
"function-architecture" : "x86_64"
1919
}

Libraries/test/TestServerlessApp/serverless.template

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,44 @@
15291529
"StreamViewType": "NEW_AND_OLD_IMAGES"
15301530
}
15311531
}
1532+
},
1533+
"ScheduledHandler": {
1534+
"Type": "AWS::Serverless::Function",
1535+
"Metadata": {
1536+
"Tool": "Amazon.Lambda.Annotations",
1537+
"SyncedEvents": [
1538+
"FiveMinuteSchedule"
1539+
],
1540+
"SyncedEventProperties": {
1541+
"FiveMinuteSchedule": [
1542+
"Schedule",
1543+
"Description"
1544+
]
1545+
}
1546+
},
1547+
"Properties": {
1548+
"MemorySize": 512,
1549+
"Timeout": 30,
1550+
"Policies": [
1551+
"AWSLambdaBasicExecutionRole"
1552+
],
1553+
"PackageType": "Image",
1554+
"Events": {
1555+
"FiveMinuteSchedule": {
1556+
"Type": "Schedule",
1557+
"Properties": {
1558+
"Schedule": "rate(5 minutes)",
1559+
"Description": "Runs every 5 minutes"
1560+
}
1561+
}
1562+
},
1563+
"ImageUri": ".",
1564+
"ImageConfig": {
1565+
"Command": [
1566+
"TestServerlessApp::TestServerlessApp.ScheduledProcessing_HandleSchedule_Generated::HandleSchedule"
1567+
]
1568+
}
1569+
}
15321570
}
15331571
}
1534-
}
1572+
}

0 commit comments

Comments
 (0)