-
Notifications
You must be signed in to change notification settings - Fork 1
feat(testing): add MinimalLambda.Testing package #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
134 commits
Select commit
Hold shift + click to select a range
491b329
feat(testing): add AwsLambda.Host.Testing project
j-d-ha b056510
feat(examples): add AwsLambda.Host.Examples.Testing project
j-d-ha 9e16863
feat(testing): enhance AwsLambda.Host.Examples.Testing with unit testβ¦
j-d-ha 2916e80
feat(testing): add DeferredHostBuilder to AwsLambda.Host.Testing
j-d-ha 726ae90
feat(testing): add LambdaApplicationFactory to AwsLambda.Host.Testing
j-d-ha af9ade7
docs(testing): update README with HTTP request/response examples
j-d-ha f9db8c9
docs(testing): add licensing attribution for LambdaApplicationFactory
j-d-ha 38165d1
feat(examples): add HTTP request/response logging to testing example
j-d-ha 00d69e3
fix(scripts): update version extraction logic in validate-version.sh
j-d-ha 5595e2e
feat(testing): add HostFactoryResolver to AwsLambda.Host.Testing
j-d-ha 52af97c
chore(licenses): update copyright and licensing attributions
j-d-ha 725f1ae
chore(config): add .csharpierignore and update .editorconfig settings
j-d-ha 15674ca
feat(testing): add LambdaApplicationFactoryClientOptions and LambdaTeβ¦
j-d-ha 3fc216d
feat(testing): migrate LambdaApplicationFactory to use IHostBuilder
j-d-ha 7294801
feat(testing): add Microsoft.AspNetCore.Routing package
j-d-ha eadbf23
feat(testing): add ErrorResponse model to represent structured error β¦
j-d-ha dadaf34
feat(testing): add LambdaRuntimeRouteManager with route matching implβ¦
j-d-ha 97269f1
feat(testing): add RequestType enum for Lambda runtime request classiβ¦
j-d-ha 2200769
feat(testing): add InvocationResponse model for Lambda testing
j-d-ha d714233
feat(testing): add LambdaBootstrapRequest model for request handling
j-d-ha d0a0a03
feat(testing): add LambdaClient for managing Lambda runtime requests
j-d-ha abdf25c
feat(testing): enhance LambdaTestingHttpHandler with request/responseβ¦
j-d-ha 053b086
feat(testing): update route templates to support version-based paths
j-d-ha 42f14b1
feat(testing): add customizable Lambda invocation headers and responsβ¦
j-d-ha 3ac1fb9
feat(testing): add configuration support to LambdaClient
j-d-ha 827748b
refactor(testing): extract request creation logic into `CreateRequestβ¦
j-d-ha 3f8da1e
feat(testing): add options for customizing Lambda invocation headers β¦
j-d-ha c7b4754
refactor(testing): improve response header configuration and LambdaClβ¦
j-d-ha 6ffae76
feat(testing): improve request ID generation and invocation handling β¦
j-d-ha 9d7fc04
feat(testing): enhance Lambda request/response handling in LambdaClient
j-d-ha 6cac8a3
fix(testing): handle null deserialization fallback in LambdaClient reβ¦
j-d-ha d12498b
refactor(testing): remove unnecessary WaitForNextRequestAsync call
j-d-ha 297edb1
fix(testing): allow null RequestId and update fallback logic
j-d-ha d23cd77
refactor(testing): simplify request ID generation and remove unused iβ¦
j-d-ha 5f14c2e
refactor(testing): replace DelegatingHandler with HttpMessageHandler β¦
j-d-ha 5fa0a86
feat(testing): add LambdaTestServer implementation and update dependeβ¦
j-d-ha 3a35bb8
refactor(testing): replace TestServer with LambdaTestServer in Lambdaβ¦
j-d-ha 268c8a9
refactor(testing): remove redundant TestServer configuration in Lambdβ¦
j-d-ha f10f596
feat(testing): add System.Net.Http and System.Text.RegularExpressionsβ¦
j-d-ha ae36d1c
refactor(testing): update class access modifiers and refactor LambdaTβ¦
j-d-ha 2d386ae
feat(testing): replace TestServer with LambdaTestServer and add bootsβ¦
j-d-ha e4dfcec
feat(testing): add LambdaApplicationFactoryContentRootAttribute impleβ¦
j-d-ha 4abe2e6
feat(testing): add Microsoft.Extensions.DependencyModel package to prβ¦
j-d-ha 9e437f7
refactor(testing): clean up and optimize LambdaApplicationFactory conβ¦
j-d-ha 90035e8
refactor(testing): simplify exception handling in LambdaApplicationFaβ¦
j-d-ha 10f9ac9
refactor(testing): comment out unused methods and clean up HttpClientβ¦
j-d-ha 1371f0a
refactor(testing): remove LoggingHttpHandler and streamline HTTP clieβ¦
j-d-ha 46cfe36
refactor(testing): update method visibility and parameter order in Laβ¦
j-d-ha 142cc7f
feat(testing): add LambdaClient creation and enhance Lambda bootstrapβ¦
j-d-ha 6987af2
refactor(testing): remove unimplemented Dispose method in LambdaTestSβ¦
j-d-ha 31bccdf
feat(testing): add integration test for LambdaHost
j-d-ha 0d33131
refactor(testing): simplify path extraction logic in LambdaRuntimeRouβ¦
j-d-ha 1287b9d
refactor(testing): remove unimplemented server methods in LambdaTestSβ¦
j-d-ha 966cb34
refactor(testing): rename `GetClient` to `CreateClient` and remove unβ¦
j-d-ha fdaf0e1
feat(testing): enhance LambdaTestServer with transaction-based architβ¦
j-d-ha 59b71d7
refactor(testing): rename testing handler and client for clarity
j-d-ha c92d1e3
refactor(testing): clean up and simplify LambdaApplicationFactory (#221)
j-d-ha 3384b03
feat(testing): update server implementation and enhance testing infraβ¦
j-d-ha 638e4b4
refactor(testing): rename namespaces and project for consistency
j-d-ha 876ded4
feat(testing): update dependencies and project references for Minimalβ¦
j-d-ha 94bd399
feat(testing): add MinimalLambda project references and update usages
j-d-ha d1986f8
chore(deps): update Microsoft.Extensions.Hosting package versions
j-d-ha 568a474
refactor(testing): update project references and namespaces for Minimβ¦
j-d-ha 8e04f74
refactor(testing): replace ClientOptions with ServerOptions across faβ¦
j-d-ha caadd88
refactor(testing): enhance resource cleanup and documentation in factβ¦
j-d-ha 2d781fd
feat(testing): enhance XML documentation for Lambda test server and iβ¦
j-d-ha 80f1ea3
refactor(testing): reorder fields and add null-forgiveness in LambdaTβ¦
j-d-ha 9fdaab2
refactor(testing): improve shutdown and resource disposal in LambdaTeβ¦
j-d-ha 2a90667
refactor(testing): simplify README for MinimalLambda.Testing
j-d-ha d4e801c
docs(testing): expand README with usage details and examples
j-d-ha d08f053
docs(testing): clarify README description for LambdaApplicationFactorβ¦
j-d-ha 83bf8b4
docs(testing): remove outdated examples section from README
j-d-ha 3473a75
docs(testing): update package description in project file
j-d-ha 44a00c7
docs(testing): update example in README to use "Hello World"
j-d-ha ad50cc0
refactor(testing): improve accessibility, disposal, and route handling
j-d-ha 7a2edc5
feat(testing): add unit tests and new support features for MinimalLambda
j-d-ha 467bfdd
feat(testing): add unit tests for new lambda scenarios
j-d-ha e056990
feat(testing): add internal visibility for unit testing in lambda proβ¦
j-d-ha 2ddb9f4
feat(DiLambda): implement dependency injection and lifecycle management
j-d-ha 87965a0
feat(tests): update NoEventLambda handler to return detailed response
j-d-ha 60ea39d
feat(tests): update NoResponseLambda to process Request type
j-d-ha 72f3a79
feat(DiLambda): add logging and middleware support
j-d-ha c07b1b4
feat(testing): enhance disposal and cancellation handling in test infβ¦
j-d-ha 9be7a1e
feat(tests): refactor `SimpleLambdaTests` for improved cancellation hβ¦
j-d-ha 9580e7e
feat(tests): validate input for `SimpleLambda` handler
j-d-ha b245a0d
feat(testing): extend `LambdaTestServer` methods with event response β¦
j-d-ha 7efa06f
feat(tests): add concurrency and error propagation tests for `SimpleLβ¦
j-d-ha a9bb7bf
feat(testing): improve `LambdaTestServer` lifecycle handling and initβ¦
j-d-ha 7b479e4
feat(tests): add cancellation test for `SimpleLambda` with pre-cancelβ¦
j-d-ha e1a1ee0
refactor(examples): remove `AwsLambda.Host.Example.Testing` examples β¦
j-d-ha 67b03ce
refactor(testing): reorganize properties and add missing members to `β¦
j-d-ha 0b79147
feat(tests): add support for multiple frameworks and enhance testing β¦
j-d-ha 200c5a3
feat(tests): add `NoEventLambdaTests` and expand framework compatibility
j-d-ha 2a40e27
feat(tests): add `DiLambdaTests` and update framework compatibility
j-d-ha 7aca35d
feat(tests): add advanced lifecycle tests for `DiLambda`
j-d-ha efe37b3
fix(runtime): handle `TaskCanceledException` more accurately during Lβ¦
j-d-ha 47211d1
feat(testing): add cancellation token support to `LambdaTestingHttpHaβ¦
j-d-ha 25b3be2
fix(testing): improve exception handling and shutdown reliability
j-d-ha 2c9386d
fix(tests): simplify exception assertion in `SimpleLambdaTests`
j-d-ha 948800c
fix(tests): refactor `DiLambdaTests` and improve test configuration
j-d-ha 1442e9e
feat(tests): enhance `NoEventLambda` configuration and add new test case
j-d-ha 7c70f37
feat(tests): extend `DiLambdaTests` with Autofac container support
j-d-ha 5b58c01
feat(tests): improve `NoResponseLambda` test coverage and enhance shuβ¦
j-d-ha 2b371b0
refactor(testing): remove unused `Fail` method from `LambdaHttpTransaβ¦
j-d-ha fe14caa
refactor(testing): remove unused `CreateHostBuilder` method and simplβ¦
j-d-ha 75f22b3
fix(testing): adjust `LambdaTestServer` initialization for improved rβ¦
j-d-ha 5d963ea
feat(tests): add unit tests for `DictionaryExtensions`
j-d-ha d3db8bf
fix(testing): improve exception handling for disposed services in hosβ¦
j-d-ha 5a680b0
feat(tests): add internal visibility for `MinimalLambda.Testing.UnitTβ¦
j-d-ha 4dde9ea
fix(ci): update SonarQube exclusions for specific file
j-d-ha 405bd65
fix(ci): add `testing` as an allowed commit scope in PR title validation
j-d-ha c73159f
Merge branch 'main' into feature/#185-add-testing-package
j-d-ha 216b570
feat(tests): add concurrency test for `SimpleLambda` without `Start`
j-d-ha 421f0c2
fix(testing): improve exception messages in `LambdaTestServer`
j-d-ha f793185
Merge remote-tracking branch 'origin/feature/#185-add-testing-packageβ¦
j-d-ha 0e52cd4
feat(testing): add `InitAlreadyCompleted` status to `LambdaTestServer`
j-d-ha 6ef4355
feat(testing): add convenience methods to `LambdaTestServerExtensions`
j-d-ha c78076b
feat(testing): add generic `InvocationResponse<TResponse>` model
j-d-ha c290765
fix(testing): simplify host disposal logic in `LambdaApplicationFactory`
j-d-ha cdbd46e
refactor(testing): replace unused variable with discard in `LambdaAppβ¦
j-d-ha 9e864d0
fix(testing): standardize method name `WithCancellationToken` across β¦
j-d-ha 7577d58
fix(testing): correct XML documentation for `LambdaApplicationFactoryβ¦
j-d-ha 74b98df
refactor(testing): make `LambdaRuntimeRouteManager` static and removeβ¦
j-d-ha 05f583a
feat(testing): add `Causes` property and make `ErrorType` required inβ¦
j-d-ha a51fe3c
refactor(testing): simplify dictionary initialization in `DictionaryEβ¦
j-d-ha f160402
fix(testing): remove pending invocation after handling request
j-d-ha 8750ca3
fix(testing): handle semaphore release on conditional acquisition in β¦
j-d-ha c870d66
fix(testing): improve server disposal and simplify host start logic
j-d-ha 83e21a6
refactor(testing): update test implementation to use factory instanceβ¦
j-d-ha 73a806d
refactor(testing): use inline factory instances in `NoResponseLambdaTβ¦
j-d-ha f6c693f
refactor(testing): use inline factory instances in `DiLambdaTests` anβ¦
j-d-ha b931baf
fix(testing): make `LambdaTestServer` host start asynchronous
j-d-ha 17308db
fix(testing): replace `GetService` with `GetRequiredService` for `IHoβ¦
j-d-ha 3ed0672
fix(testing): improve cancellation handling and resolve dependencies β¦
j-d-ha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| src/AwsLambda.Host.Testing/HostFactoryResolver.cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/MinimalLambda.Abstractions/Options/DefaultLambdaJsonSerializerOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
| using Amazon.Lambda.Serialization.SystemTextJson; | ||
| using Amazon.Lambda.Serialization.SystemTextJson.Converters; | ||
|
|
||
| namespace MinimalLambda.Options; | ||
|
|
||
| /// <summary>Provides the default JSON serializer options used by AWS Lambda.</summary> | ||
| public static class DefaultLambdaJsonSerializerOptions | ||
| { | ||
| /// <summary> | ||
| /// Creates a <see cref="JsonSerializerOptions" /> instance that matches the defaults used by | ||
| /// <see cref="DefaultLambdaJsonSerializer" />. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// <para>Configures null-value ignoring, case-insensitive property names, and the AWS naming policy.</para> | ||
| /// <para>Adds the AWS-provided converters for dates, memory streams, constant classes, and byte arrays.</para> | ||
| /// </remarks> | ||
| /// <returns>Configured JSON serializer options suitable for AWS Lambda payloads.</returns> | ||
| public static JsonSerializerOptions Create() | ||
| { | ||
| var options = new JsonSerializerOptions | ||
| { | ||
| DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | ||
| PropertyNameCaseInsensitive = true, | ||
| PropertyNamingPolicy = new AwsNamingPolicy(), | ||
| }; | ||
| options.Converters.Add(new DateTimeConverter()); | ||
| options.Converters.Add(new MemoryStreamConverter()); | ||
| options.Converters.Add(new ConstantClassConverter()); | ||
| options.Converters.Add(new ByteArrayConverter()); | ||
|
|
||
| return options; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.