-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
module tests #34
Comments
This is actually very good idea. We will definitely benefit from test suit that will check all the modules in terms of compliance with RouterSploit standards. Things like if there are appropriate keys in exploits info dict etc. That way PRs with exploit modules will be checked during Travis build and contributor will get instant feedback. |
😄 awesome. I figure module tests can reuse the module loading code from |
Looks like worth digging into. I just want to point out that importing module might be time consuming. So in sake of performance we definitely have to import it just once, run all possible checks and go to the next module. |
Thanks! I'm going to start a rough sketch of the idea, and keep notes on progress. |
Hey @fwkz, I have a question you might be able to answer. I noticed that when interpreter looks for modules in |
Yes, you are right. By saying module I meant actual code that does the exploitation which is obviously an |
Not a problem! Thank you 😄. Let me know if you think #56 fits the bill. More tests can be added by someone who knows all the rules that exploit modules should follow. |
Good job. Everything looks great but I don't want to merge it just now because I'm thinking about factoring out the |
Okay, sounds like a feature worth decoupling! I'd be happy to review that code, now that I've spent some time with this part of the system. Whenever that's available, I'll update my PR. |
@allonhadaya I have pushed decoupled mechanism for loading and importing the exploits. Please check out branch new_loading_mechanism. There are a few utils function:
|
Module tests has been added. 55fa0b1 |
@fwkz thanks :) |
I found a couple tiny bugs which I'll provide a pull request for. Basically authorship information was being set under
'author'
instead of'authors'
. I wanted to write a test for it, maybe even one that checked all modules.Would it be useful to have a set of tests that are executed against every module? A place for certain invariants to be asserted? This might help keep future modules at a high quality, especially those contributed by newcomers.
Thoughts?
The text was updated successfully, but these errors were encountered: