-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node sync test refactor phase 1 #57
Merged
Merged
Conversation
This file contains 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
- Removed `update_config` and `disable_p2p_node_config` functions - Consolidated node configuration into `configure_node` function - Updated `get_node_config_files` to call `configure_node` - Disabled P2P for legacy mainnet topology in `configure_node`
- Removed redundant raw string prefix from RESULTS_FILE_NAME - Replaced ONE_MINUTE constant with direct value in time.sleep
Replaced all instances of OrderedDict with standard dictionaries in node_sync_test.py. This simplifies the code and removes unnecessary imports.
- Replaced `Path` with `pl.Path` alias for consistency - Simplified imports from `sync_tests.utils` module - Updated type hints to use `str | None` syntax - Improved readability by reducing redundant code
The sys.path.append(os.getcwd()) call was removed from node_sync_test.py as it was redundant and unnecessary.
Removed references to discontinued testnets from node_sync_test.py. This includes removing conditions for "testnet", "staging", and "shelley-qa" environments. The code now only handles "mainnet", "preview", and "preprod" environments.
- Changed return type of `get_epoch_no_d_zero` and `get_start_slot_no_d_zero` from `int | None` to `int`, returning `-1` instead of `None`. - Modified `get_testnet_value` to return an empty string instead of `None`. - Updated `get_current_tip` to use f-string for command construction.
- Replaced `chdir` calls with `temporary_chdir` context manager - Updated functions to use `pl.Path` for path manipulations - Improved readability and maintainability of the code
Replaced all instances of `utils` module with `helpers` module in `node_sync_test.py`. This change ensures consistency and improves code readability by using a single module for helper functions.
Refactored node sync test functions to remove the global `args` variable. Functions now accept environment as a parameter. Added logging for better debugging and tracking. Updated function names and signatures to improve clarity and consistency. Adjusted main function to initialize logging and parse arguments separately.
- Added logging configuration to multiple test files - Replaced direct logging calls with LOGGER in utility modules - Ensured consistent logging format across the codebase
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.
No description provided.