cardano_node_tests package

Subpackages

Submodules

cardano_node_tests.block_production_graph module

Generate a bar chart of total blocks per backend from an SQLite database.

The script retrieves the latest run_id from the runs table, aggregates the total blocks per backend from the blocks table, and generates a bar chart saved as an image file.

cardano_node_tests.block_production_graph.get_blocks_per_backend(conn: Connection, *, run_id: str) list[tuple[str, int]][source]

Return a list of (backend, total_blocks) for the given run_id.

Aggregates num_blocks across all epochs and pools.

cardano_node_tests.block_production_graph.get_latest_run_id(conn: Connection) str[source]

Return the latest run_id from the runs table.

Assumes β€œlatest” means last inserted row (highest rowid).

cardano_node_tests.block_production_graph.main() int[source]
cardano_node_tests.block_production_graph.parse_args() Namespace[source]
cardano_node_tests.block_production_graph.plot_backend_blocks(backend_data: list[tuple[str, int]], *, run_name: str, output_path: Path) None[source]

Plot a bar chart of total blocks per backend.

cardano_node_tests.cardano_cli_coverage module

Generate coverage report for cardano-cli sub-commands and options.

cardano_node_tests.cardano_cli_coverage.cli(cli_args: Iterable[str]) str[source]

Run the cardano-cli command.

cardano_node_tests.cardano_cli_coverage.get_args() Namespace[source]

Get script command line arguments.

cardano_node_tests.cardano_cli_coverage.get_available_commands(cli_args: Iterable[str], ignore_skips: bool = False) dict[source]

Get all available cardano-cli sub-commands and options.

cardano_node_tests.cardano_cli_coverage.get_badge_icon(report: dict) str[source]

Return URL of badge icon.

cardano_node_tests.cardano_cli_coverage.get_coverage(coverage_files: list[Path], available_commands: dict) dict[source]

Get coverage info by merging available data.

cardano_node_tests.cardano_cli_coverage.get_log_coverage(log_file: Path) dict[source]

Get coverage info from log file containing CLI commands.

cardano_node_tests.cardano_cli_coverage.get_report(arg_name: str, coverage: dict, uncovered_only: bool = False) tuple[dict, int, int][source]

Generate coverage report.

cardano_node_tests.cardano_cli_coverage.main() int[source]
cardano_node_tests.cardano_cli_coverage.merge_coverage(dict_a: dict, dict_b: dict) dict[source]

Merge dict_b into dict_a.

cardano_node_tests.cardano_cli_coverage.parse_cmd_output(output: str) list[str][source]

Parse cardano-cli command output, return sub-commands and options names.

cardano_node_tests.cardano_cli_coverage.sanitize_coverage(coverage: dict) dict[source]

Sanitize coverage data.

Merge coverage data into β€œlatest” and remove duplicate command groups.

cardano_node_tests.chang_us_coverage module

Generate coverage report of Chang User Stories.

cardano_node_tests.chang_us_coverage.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.chang_us_coverage.main() int[source]

cardano_node_tests.defragment_utxos module

Defragment address UTxOs.

cardano_node_tests.defragment_utxos.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.defragment_utxos.main() int[source]

cardano_node_tests.dump_requirements_coverage module

Generate coverage results for external requirements.

cardano_node_tests.dump_requirements_coverage.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.dump_requirements_coverage.main() int[source]

cardano_node_tests.prepare_cluster_scripts module

Create a directory with scripts and config files for running cluster instance.

For settings it uses the same env variables as when running the tests.

cardano_node_tests.prepare_cluster_scripts.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.prepare_cluster_scripts.main() int[source]
cardano_node_tests.prepare_cluster_scripts.prepare_scripts_files(destdir: str | Path, testnet_variant: str, instance_num: int = 0) InstanceFiles[source]

Prepare scripts files for starting and stopping cluster instance.

cardano_node_tests.split_topology module

Generate topology files for split cluster.

For settings it uses the same env variables as when running the tests.

cardano_node_tests.split_topology.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.split_topology.main() int[source]

cardano_node_tests.testnet_cleanup module

Cleanup a testnet with the help of testing artifacts.

  • withdraw rewards

  • deregister stake addresses

  • retire DReps

  • return funds to faucet

cardano_node_tests.testnet_cleanup.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.testnet_cleanup.main() int[source]

cardano_node_tests.testnet_cleanup_info module

Print the Lovelace balance and rewards of all addresses in the given location.

cardano_node_tests.testnet_cleanup_info.get_args() Namespace[source]

Get command line arguments.

cardano_node_tests.testnet_cleanup_info.main() int[source]

Module contents