Skip to content

Extend test suite#31

Open
MarcFraile wants to merge 26 commits into
genepi:mainfrom
statgen:extend-test-suite
Open

Extend test suite#31
MarcFraile wants to merge 26 commits into
genepi:mainfrom
statgen:extend-test-suite

Conversation

@MarcFraile

Copy link
Copy Markdown
Contributor

The primary goal of this PR is to back-port new tests from statgen/cloudgene3 to upstream.

In order to port the test suite, I also had to include some codebase changes:

  • Bump to Java 21.
  • Separate JobValue from JobValueDao.
  • Explicitly require a modern commons-lang3 version and make use of RandomStringUtils.secure().
  • Allow in-memory databases in H2Connector.
  • Reorganize several classes for tidiness.
  • Rework server.Application and TestApplication so they don't depend on a shared static Settings file, allowing for independent testing.
  • Expose getFuture() in Queue and WorkflowEngine so we can explicitly wait for job completion; use it in CloudgeneClientRestAssured to avoid sleep-polling.
  • Improve HashUtil and its usage for better security; ensure passwords are always hashed correctly.

New unit tests include:

  • Tests for many DAO classes.
  • Tests for many util classes.
  • CloudgeneContextTest
  • NextflowProcessRendererTest
  • JobServiceTest

Other existing tests have been expanded and/or beautified.

MarcFraile added 26 commits June 1, 2026 04:40
…o distinguish from unit tests for cloudgene.mapred.util classes).
…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.
@lukfor

lukfor commented Jun 8, 2026

Copy link
Copy Markdown
Member

Great! Thank you. We will merge it asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants