Extend test suite#31
Open
MarcFraile wants to merge 26 commits into
Open
Conversation
…o distinguish from unit tests for cloudgene.mapred.util classes).
… make into record.
…for RandomStringUtils.
…lization does not depend on a shared static Settings variable. Ensure test user 'public' has the same password 'public-password' that can sometimes be injected from back-end. Code cleanup on TestApplication and CloudgeneClientRestAssured.
…xpose job completion futures. test.CloudgeneClientRestAssured: wait on application futures instead of sleeping.
* Add secure random HashUtil.getSecureHash() for 64-char alphanumeric hashes. * Remove time-based hashes HashUtil.getActivationHash(), HashUtil.getCrsfToken() in favor of HashUtil.getSecureHash(). * Remove custom HashUtil.getMD5() in favor of Apache commons DigestUtils.md5Hex(). * Revamp HashUtilTest for thorough testing. * Ensure we consistently use HashUtil.hashPassword() to hash passwords before storing on DB.
… and UserService so separate instances of TestApplication can be used per test.
Member
|
Great! Thank you. We will merge it asap. |
This file contains hidden or 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
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.
The primary goal of this PR is to back-port new tests from
statgen/cloudgene3to upstream.In order to port the test suite, I also had to include some codebase changes:
JobValuefromJobValueDao.commons-lang3version and make use ofRandomStringUtils.secure().H2Connector.server.ApplicationandTestApplicationso they don't depend on a shared staticSettingsfile, allowing for independent testing.getFuture()inQueueandWorkflowEngineso we can explicitly wait for job completion; use it inCloudgeneClientRestAssuredto avoid sleep-polling.HashUtiland its usage for better security; ensure passwords are always hashed correctly.New unit tests include:
utilclasses.CloudgeneContextTestNextflowProcessRendererTestJobServiceTestOther existing tests have been expanded and/or beautified.