-
Notifications
You must be signed in to change notification settings - Fork 213
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
Implement listMethods for lua generic app #570
Merged
Merged
Conversation
This file contains 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
jumaffre
reviewed
Nov 19, 2019
tests/suite/test_requirements.py
Outdated
# TODO: Parameterise this decorator once we add a test that requires a | ||
# different number of nodes | ||
def at_least_2_nodes(func): | ||
def ensure_reqs(check_reqs, func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
jumaffre
approved these changes
Nov 19, 2019
Codecov Report
@@ Coverage Diff @@
## master #570 +/- ##
=========================================
+ Coverage 78.52% 78.62% +0.1%
=========================================
Files 140 140
Lines 10558 10567 +9
=========================================
+ Hits 8290 8308 +18
+ Misses 2268 2259 -9
|
eddyashton
added a commit
to eddyashton/CCF
that referenced
this pull request
Mar 24, 2020
* Virtualise list_methods, override in luageneric * Add parametrisable test requirement * Example usage * Parametrisable decorators, standard enforcement pattern * Provide simple lua_generic_app req * batched test requires specific methods * Wrapper should forward return value! * Reduce boilerplate * Remove temp docstring
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Our
listMethods
RPC previously just returned the names of all registered handlers. Since the generic lua app (and presumably future similar generic interpreters) use the default endpoint, they don't actually report the supported methods (ie - they don't includeLOG_record
for the lua logging app). This fixes that.While doing this I also fiddled with the
test_requirements
to generate parameterised variants, so we can easily say "this test requires exactly these methods", rather than looking for a specific app. I also added theensure_reqs
meta-decorator to remove some of the boilerplate (ie - to consistently skip ifenforce_reqs
is False). I'm sure there's some way to reduce the boilerplate even further, but I don't see it straight away.