-
Notifications
You must be signed in to change notification settings - Fork 88
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
Resolve / #244 #261
Resolve / #244 #261
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #261 +/- ##
==========================================
- Coverage 98.18% 97.55% -0.63%
==========================================
Files 5 5
Lines 605 613 +8
Branches 72 75 +3
==========================================
+ Hits 594 598 +4
- Misses 11 15 +4 ☔ View full report in Codecov by Sentry. |
Hi @ayaan-qadri, |
Hello @logandk, I’d be happy to add a test case for this feature, but I need some guidance on how to do it. |
You could create a new test case by copying this one: Line 2051 in f6eee36
If you change the plugin configuration to contain multiple functions and add your new argument to the invocation, you can verify that the right function is being called (this line: Line 2079 in f6eee36
|
@logandk , I have never written test cases before. If you could tell me more or provide some resources on how to write them, I might be able to do it. |
@ayaan-qadri Essentially, you'll need to write a piece of code that uses the new feature that you've implemented and assert that it does the right thing. Since we're not testing the Serverless framework or AWS, we simply verify that the right Serverless command is going to be issued. You can run the existing test suite using |
Hey @logandk, I have added Test cases for newly feature where it is checking for below conditions:
I have added cases for rejection too, Let me know if there are any changes that need to be made. |
@ayaan-qadri Awesome, thanks for your effort. It looks like something else is messing up the CI pipeline at the moment (probably an update in ESLint that broke the build). I will look into that soon and get your PR merged. |
@logandk Thanks for the update, Let me know if you need anything from my side to get it sorted. |
Resolve #244
What Added/Updated
It now supports the --function and -f switches. If either switch is used in the command
sls wsgi manage --function <function_name> or -f <function_name>
, it will take that function name. If the specified function is not found, it will throw an error, which is handled in invokeHandler. If neither switch is present, it will return the first function with the condition handler: wsgi_handler.handler, as it did before. Let me know if you need any more changes/help!