The transferpy is a package used for database backup and recovery. This ticket is to discuss and improve the test coverage of the transferpy package.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | jcrespo | T246435 Create or improve a tool for monitoring or automating tasks for Wikimedia databases | |||
Resolved | Privacybatm | T248256 GSoC 2020 Proposal: Improve the framework to transfer files over the LAN | |||
Resolved | Privacybatm | T257600 Create more tests for transferpy package |
Event Timeline
Change 612354 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] transfer.py: Comment on setup_logger function
The following scenarios come under this ticket:
- Unit tests:
transfer.py
- correctness in logger level setting (test_setup_logger: Done)
- correctness in passing new options:
- verbose (test_verbose, test_remote_execution_verbose, test_setup_logger: Done)
- parallel-checksum (test_parallel_checksum_source_and_target_command, test_parallel_checksum: Done)
- split_traget calling (test_split_target: Done)
Firewall.py
- find_available_port (test_find_available_port: Done)
- change name of the function from find_available_port_command to find_used_ports_command: The name is misleading (Done)
- reserve_port (test_reserve_port: Done)
- unreserve_port (test_unreserve_port: Done)
- no free port available situation(test_no_available_port: Done)
- netstat and fuser absolute path (Done)
- open function (test_open_with_auto_port_finding, test_open_with_given_port, test_open_with_given_non_available_port, test_open_failure: Done)
- open sends a free port (test_open_with_auto_port_finding, test_open_with_given_port: Done)
- close function (test_close: Done)
- close is getting same port or not (test_close_gets_port_from_open: Done)
- what if no port is able to reserve after it finds free ports (test_no_available_port: Done)
- test for argument non free port (test_open_with_given_non_available_port: Done)
Transferer.py
- host_exists (test_host_exists: Done)
- is_socket (test_is_socket: Done)
- dir_is_empty (test_dir_is_empty: Done)
- parallel_checksum_source_command (test_parallel_checksum_source_command: Done)
- parallel_checksum_target_command (test_parallel_checksum_target_command: Done)
- read_checksum (test_read_checksum: Done)
- netcat_send_command and listen command (test_netcat_send_command, test_netcat_listen_command: Done)
- tar and untar command (test_untar_command, test_tar_command: Done)
- get_datadir_from_socket (test_get_datadir_from_socket: Done)
- xtrabackup_command (test_xtrabackup_command: Done)
- mbstream_command (test_mbstream_command: Done)
- password function (test_password: Done)
- copy_to as a whole (test_copy_to_success, test_copy_to_failure: Done)
- sanity_checks (test_sanity_checks_xtrabackup, test_sanity_checks_file: Done)
- after_transfer_checks (test_after_transfer_checks: Done)
(Optional)
- find_pid (test_find_pid: Done)
- kill_process (test_kill_process: Done)
- Integration tests:
Transferer.py
- parallel-checksum (test_parallel_checksum_file, test_parallel_checksum_dir, test_parallel_checksum_decompress, test_parallel_checksum_xtrabackup: Done)
- Comments:
- Give comments on setup_logger function. (Done)
Change 612384 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] transfer.py: Add unit tests
Change 612705 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Firewall.py: Provide an absolute path to commands and refactor a function
Change 612726 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Firewall.py: Add unit tests
Change 613024 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Transferer.py: Add unit tests
Change 612354 merged by jenkins-bot:
[operations/software/transferpy@master] transfer.py: Comment on setup_logger function
Change 612705 merged by jenkins-bot:
[operations/software/transferpy@master] Firewall.py: Provide an absolute path to commands and refactor a function
Not a huge priority, but check if you can rebase cleanly the extra units tests to HEAD, after the latest merges, and they still validate. It doesn't let me do it automatically, but I am guessing the manual rebase is not too involved.
Change 612384 merged by Jcrespo:
[operations/software/transferpy@master] transfer.py: Add unit tests
Change 612726 merged by jenkins-bot:
[operations/software/transferpy@master] Firewall.py: Add unit tests
The transferpy unit test file is getting much larger. If there is enough time, it would be nice to split, where possible, the different classes on different files, to keep individual file size smaller.
Change 615688 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] transferpy: Change tox development environment to Python3.7
Change 615688 merged by jenkins-bot:
[operations/software/transferpy@master] transferpy: Change tox development environment to Python3.7
Change 613024 merged by jenkins-bot:
[operations/software/transferpy@master] Transferer.py: Add unit tests