-
Notifications
You must be signed in to change notification settings - Fork 9
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
Issue 51749: Site validator fails on some wikis #2156
Issue 51749: Site validator fails on some wikis #2156
Conversation
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 doing this
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.
The wiki module isn't in the base distribution anymore.
DatabaseDiagnosticsTest
gets run in a lot of suites, possibly ones where the wiki module isn't present. If not now, possibly in the future. It is also intended to be run at the end of suites to do some extra validation, without adding much extra overhead.
I would put this check into a separate test (or maybe one of the existing wiki tests) to avoid the overhead of creating an extra project and wiki in suites that aren't wiki-focused.
PortalHelper portalHelper = new PortalHelper(this); | ||
portalHelper.addBodyWebPart("Wiki"); |
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.
Adding the wiki webpart makes the setup longer and makes the test likely to trigger the CSP just by navigating through the project home page. Better to goToModule("Wiki")
to create the wiki.
@labkey-tchad I moved my new coverage into a new test, I don't have a good handle on the life cycle here, and can't repro locally. Any suggestions? |
Yeah, the JUnit lifecycle makes these tricky. Now that I look at it again, what you're seeing makes sense. Each Instead of having an off/on switch, a better option might be to call Also, |
Thanks for the guidance. The test just passed on TeamCity. As a separate followup, should we avoid figure out how to avoid registering multiple |
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.
We can deal with the duplicate CspCheckPageLoadListeners
later. Hopefully the fact that the page load listeners are stored in a WeakHashMap
means we don't build up too many at once.
Rationale
Add some test coverage for site validation of wikis.
Related Pull Requests
Changes
getCurrentTest()