Skip to content

test: fix rpcauth test failure when test/config.ini is missing#153

Open
lustsazeus-lab wants to merge 1 commit intoBitgesellOfficial:masterfrom
lustsazeus-lab:fix/issue-32-rpcauth-test-config-fallback
Open

test: fix rpcauth test failure when test/config.ini is missing#153
lustsazeus-lab wants to merge 1 commit intoBitgesellOfficial:masterfrom
lustsazeus-lab:fix/issue-32-rpcauth-test-config-fallback

Conversation

@lustsazeus-lab
Copy link
Copy Markdown

Summary

  • make test/util/rpcauth-test.py runnable from a fresh source checkout where test/config.ini has not been generated yet
  • keep current behavior when test/config.ini exists
  • add fallback import path to share/rpcauth/rpcauth.py for local/direct unit test runs

Why

The current test hard-fails with FileNotFoundError when run directly in a clean checkout:

python3 test/util/rpcauth-test.py
FileNotFoundError: .../test/config.ini

This change fixes that path so contributors can run the rpcauth unit test without doing a full config generation step first.

Validation

  • python3 test/util/rpcauth-test.py ✅ (3 tests passed)
  • python3 -m py_compile test/util/rpcauth-test.py

Fixes #32

@bountydotnew submit

@lustsazeus-lab
Copy link
Copy Markdown
Author

Friendly ping on this PR — it has been sitting open for a while and is currently mergeable (CLEAN).

If anything needs to be adjusted on my side, I can update it quickly. Otherwise, I'd appreciate a review when you have a moment.

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.

BGL PR bounty hunt

1 participant