-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BridgeImplementationTest] Rewritten unit test to check bridges #980
[BridgeImplementationTest] Rewritten unit test to check bridges #980
Conversation
I see, Travis already performs this test, which exhibits the problem described above. |
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.
Thanks for the PR!
Refactoring is a very good idea and it looks like you know how to do this properly. Find below a few comments for improvements.
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.
Thanks for your suggestions, they were great.
Note that I omitted the changes testing for empty value strings. I had them your suggested way first, but there are bridges that intentionally use '0' as a valid value. The test would fail then.
* [DealabsBridge] fixed parameters * [DemonoidBridge] added parameter context names * [DevToBridge] fixed parameters * [ExtremeDownloadBridge] fixed parameters * [GithubIssueBridge] fixed parameters * [InstagramBridge] added parameter context names * [MydealsBridge] fixed parameters * [OnVaSortirBridge] fixed parameters * [ThingyverseBridge] fixed parameters * [HotUKDealsBridge] fixed parameters * [FeedExpanderExample] added proper URI * [GQMagazineBridge] fixed parameters and getDomain() * [MozillaSecurityBridge] fixed filename References #980
Thanks for the feedback. You are right, 0 would have set incorrect flags. I've merged #984. Please rebase this branch to get a successful build. |
… they are actually empty
There are simply too many bridges that won't work with SSL.
Co-Authored-By: fulmeek <36341513+fulmeek@users.noreply.github.com>
Do you see the difference? Travis did.
379421b
to
4230198
Compare
This should do it :) |
Merged. Thanks again for the PR! |
* [DealabsBridge] fixed parameters * [DemonoidBridge] added parameter context names * [DevToBridge] fixed parameters * [ExtremeDownloadBridge] fixed parameters * [GithubIssueBridge] fixed parameters * [InstagramBridge] added parameter context names * [MydealsBridge] fixed parameters * [OnVaSortirBridge] fixed parameters * [ThingyverseBridge] fixed parameters * [HotUKDealsBridge] fixed parameters * [FeedExpanderExample] added proper URI * [GQMagazineBridge] fixed parameters and getDomain() * [MozillaSecurityBridge] fixed filename References RSS-Bridge#980
This is a completely rewritten unit test to check whether the bridges are implemented as mentioned in the wiki.
It performs the following tests on each bridge:
However, it does not perform any item checks. Since the generated items heavily depend on the source and the actual parameters, they should be checked directly by the format classes or an intermediate item class to generate a valid feed.
Unfortunately, there are many bridges that do not pass this unit test. They mostly have less clean parameter lists, or they don't use HTTPS even though they usually could. It may take some effort to fix them all. I'm not sure if we should force HTTPS though.
I'm usually not comfortable with completely replacing something that has evolved over the time. What do you think?