Skip to content

Support custom IServer with LambdaTestServer #247

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 7 commits into from
Mar 5, 2022

Conversation

martincostello
Copy link
Owner

@martincostello martincostello commented Mar 4, 2022

Support using a custom IServer with LambdaTestServer.

This enables, for example, running the test server on a real HTTP port.

TODO

  • Update README
  • Add sample ASP.NET Core app that can be used with a test that uses the new feature

Support using a custom IServer with LambdaTestServer.
This enables, for example, running the test server on a real HTTP port.
@martincostello martincostello added the enhancement New feature or request label Mar 4, 2022
@martincostello martincostello added this to the v0.5.1 milestone Mar 4, 2022
@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #247 (9b4d8d7) into main (0cfe012) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
+ Coverage   99.26%   99.29%   +0.03%     
==========================================
  Files           8        8              
  Lines         271      283      +12     
==========================================
+ Hits          269      281      +12     
  Misses          2        2              
Flag Coverage Δ
linux 99.29% <100.00%> (+0.03%) ⬆️
macos 99.29% <100.00%> (+0.03%) ⬆️
windows 98.58% <100.00%> (-0.68%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/AwsLambdaTestServer/LambdaTestServer.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cfe012...9b4d8d7. Read the comment docs.

Add a unit test for if CreateServer() returns null.
Reduce copy-paste by moving the code to get the base address into a private method.
Add unit test for if the server has no addresses.
Add a sample project and unit test for running a Minimal API as a Lambda function with API Gateway.
Add content about the custom Lambda IServer.
Update some out-of-date references/links.
@martincostello martincostello marked this pull request as ready for review March 5, 2022 15:10
Simplify the test by just using Task.Run().
Do not run the two LambdaTestServer test classes in parallel with each other.
@martincostello martincostello merged commit 35c3424 into main Mar 5, 2022
@martincostello martincostello deleted the Support-Custom-Server branch March 5, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant