You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consolidates test configuration files by deleting four redundant config files (args-test.conf, config-test-index.conf, config-test-mainnet.conf, config-test-storagetest.conf) and standardizing tests to use a single shared config-test.conf. Also renames config-localtest.conf to config-shield.conf to better reflect its purpose (shielded-transfer tests), and removes the hardcoded seed node list from config-test.conf since unit tests have no need for P2P connectivity.
Specifically:
Delete 4 redundant test config files (~940 lines removed)
Rename config-localtest.conf → config-shield.conf
Remove NET_CONF, MAINNET_CONF, LOCAL_CONF, STORAGE_CONF, INDEX_CONF from TestConstants; add SHIELD_CONF
Update all affected test classes to reference TestConstants.TEST_CONF or TestConstants.SHIELD_CONF instead of bare string literals
Clear seed node IPs from config-test.conf; adjust ArgsTest seed-node assertion from 11 → 0
Why are these changes required?
The previous test suite maintained five separate .conf files that largely duplicated each other, making it hard to know which config to use for a new test and causing drift over time (e.g., config-test-mainnet.conf contained mainnet genesis/seed data that is irrelevant and potentially misleading in a unit-test context). Centralizing to one default test config (config-test.conf) and one purpose-specific config (config-shield.conf) reduces maintenance overhead and eliminates accidental coupling to live-network parameters in tests.
This PR has been tested by:
Unit Tests
Extra details
StorageTest gains additional coverage to compensate for the removal of config-test-storagetest.conf-dependent tests that were folded into the unified config.
Follow-up observation, not blocking: although this PR deletes four redundant config files (-996 lines, well-deserved cleanup), the consolidated config-test.conf itself drops only 18 lines (387 → 369), and the renamed config-shield.conf drops 17. So the consolidation eliminates file drift risk but doesn't reduce per-test config-load surface — each of the ~21 affected tests still loads a 369-line conf, mostly boilerplate it doesn't read.
That's a real, but smaller, win. Worth being explicit in the PR description:
Note: this PR consolidates files but does not slim the unified config-test.conf (~369 lines) itself. Per-test inline overrides via ConfigFactory.parseString are a follow-up.
Otherwise reviewers (and future contributors) may expect the consolidation step alone to address the boilerplate problem, when in fact the boilerplate just got concentrated in one place.
Concrete follow-up path, if someone wants to pursue it later: tests with narrow needs (e.g. AssetUpdateHelperTest, StorageTest, ApiUtilTest) can move to inline ConfigFactory.parseString(...).withFallback(ConfigFactory.defaultReference()) and shed their dependency on TEST_CONF entirely. reference.conf already provides the safety net thanks to PR #6615.
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
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.
What does this PR do?
Consolidates test configuration files by deleting four redundant config files (
args-test.conf,config-test-index.conf,config-test-mainnet.conf,config-test-storagetest.conf) and standardizing tests to use a single sharedconfig-test.conf. Also renamesconfig-localtest.conftoconfig-shield.confto better reflect its purpose (shielded-transfer tests), and removes the hardcoded seed node list fromconfig-test.confsince unit tests have no need for P2P connectivity.Specifically:
config-localtest.conf→config-shield.confNET_CONF,MAINNET_CONF,LOCAL_CONF,STORAGE_CONF,INDEX_CONFfromTestConstants; addSHIELD_CONFTestConstants.TEST_CONForTestConstants.SHIELD_CONFinstead of bare string literalsconfig-test.conf; adjustArgsTestseed-node assertion from 11 → 0Why are these changes required?
The previous test suite maintained five separate
.conffiles that largely duplicated each other, making it hard to know which config to use for a new test and causing drift over time (e.g.,config-test-mainnet.confcontained mainnet genesis/seed data that is irrelevant and potentially misleading in a unit-test context). Centralizing to one default test config (config-test.conf) and one purpose-specific config (config-shield.conf) reduces maintenance overhead and eliminates accidental coupling to live-network parameters in tests.This PR has been tested by:
Extra details
StorageTestgains additional coverage to compensate for the removal ofconfig-test-storagetest.conf-dependent tests that were folded into the unified config.