Skip to content

Fix: updated RootConverter's unit tests - #1440

Merged
milanmajchrak merged 2 commits into
dtq-devfrom
903-be/configurable-version-string-fix-tests
Sep 11, 2026
Merged

Fix: updated RootConverter's unit tests#1440
milanmajchrak merged 2 commits into
dtq-devfrom
903-be/configurable-version-string-fix-tests

Conversation

@jr-rk

@jr-rk jr-rk commented Sep 11, 2026

Copy link
Copy Markdown

fix(tests): adjust RootConverters unit tests to assert CLARIN-DSpace instead of DSpace

Problem description

Backported #1405 was merged but unit 2 unit tests failed:

[ERROR] Failures: 
[ERROR]   RootConverterTest.testCorrectInternalUrlSetFromConfigurationService:87 expected:<[]DSpace 7.6.5> but was:<[CLARIN-]DSpace 7.6.5>
[ERROR]   RootConverterTest.testCorrectPropertiesSetFromConfigurationService:68 expected:<[]DSpace 7.6.5> but was:<[CLARIN-]DSpace 7.6.5>

Fix

Fixed testConfigurableVersionPrefix, which stubbed dspace.version.prefix with a stale default arg ("DSpace") left over from before the prod default changed to "CLARIN-DSpace", causing Mockito's strict-stub runner to flag it as an unused stub (UnnecessaryStubbingException) since the real code never called getProperty with that argument. Updated the stub's default arg to match and changed its return value to a distinct "CustomPrefix" so the test actually verifies override behavior instead of duplicating setUp(), and added testBlankVersionPrefixFallsBackToDefault to cover the blank-value fallback path.

@jr-rk jr-rk self-assigned this Sep 11, 2026
@milanmajchrak
milanmajchrak merged commit 6be282a into dtq-dev Sep 11, 2026
10 checks passed
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