File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
LambdaRuntimeDockerfiles/SmokeTests/test Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ public ImageFunctionTests()
71
71
[ InlineData ( "ImageFunction::ImageFunction.Function::Ping" , "ping" , "pong" ) ]
72
72
[ InlineData ( "ImageFunction::ImageFunction.Function::HttpsWorksAsync" , "" , "SUCCESS" ) ]
73
73
[ InlineData ( "ImageFunction::ImageFunction.Function::VerifyLambdaContext" , "" , "SUCCESS" ) ]
74
+ [ InlineData ( "ImageFunction::ImageFunction.Function::VerifyTzData" , "" , "SUCCESS" ) ]
74
75
public async Task SuccessfulTests ( string handler , string input , string expectedResponse )
75
76
{
76
77
await UpdateHandlerAsync ( handler ) ;
@@ -170,6 +171,7 @@ await _lambdaClient.CreateFunctionAsync(new CreateFunctionRequest
170
171
MemorySize = 512 ,
171
172
Role = _executionRoleArn ,
172
173
PackageType = PackageType . Image ,
174
+ Timeout = 30 ,
173
175
Architectures = new List < string > { GetArchitecture ( ) }
174
176
} ) ;
175
177
break ;
Original file line number Diff line number Diff line change @@ -116,6 +116,18 @@ public string VerifyLambdaContext(ILambdaContext lambdaContext)
116
116
return GetResponse ( true ) ;
117
117
}
118
118
119
+ // .NET on Linux uses the tzdata system package to get time zone information.
120
+ // If TzData is not installed/available in the Linux environment the
121
+ // TimeZoneInfo.GetSystemTimeZones() will return an empty collection.
122
+ // For futher information: https://github.com/aws/aws-lambda-dotnet/issues/1620
123
+ public string VerifyTzData ( ILambdaContext lambdaContext )
124
+ {
125
+ AssertTrue ( TimeZoneInfo . GetSystemTimeZones ( ) . Count > 0 , "No time zones were found" ) ;
126
+ AssertNotNull ( TimeZoneInfo . FindSystemTimeZoneById ( "Europe/London" ) , "Failed to find Europe/London timezone" ) ;
127
+
128
+ return SuccessResult ;
129
+ }
130
+
119
131
#endregion
120
132
121
133
#region Private methods
You can’t perform that action at this time.
0 commit comments