mirror of
https://codeberg.org/privacy1st/subprocess-util
synced 2024-12-22 22:06:05 +01:00
add test
This commit is contained in:
parent
34100b0f21
commit
53ec98f397
@ -6,6 +6,8 @@ from pathlib import Path
|
||||
from subprocess_util.exec_capture import execute_capture
|
||||
from subprocess_util.exec_print_capture import execute_print_capture
|
||||
from subprocess_util.exec_produce_chunks import execute_produce_chunks
|
||||
from subprocess_util.chunked_transfer.active_send.exec_receive_chunks_passive import exec_receive_chunks_passive
|
||||
from subprocess_util.chunked_transfer.active_send.exec_send_chunks_active import exec_send_chunks_active
|
||||
|
||||
|
||||
def test():
|
||||
@ -18,7 +20,10 @@ def test():
|
||||
# test11()
|
||||
# test12()
|
||||
# test13()
|
||||
test14()
|
||||
# test14()
|
||||
|
||||
test15_recieve()
|
||||
test15_send()
|
||||
|
||||
|
||||
def test1():
|
||||
@ -167,6 +172,28 @@ def test14():
|
||||
f'sudo btrfs-receive-chunks-active {ssh_source} {source_chunk_dir} {target_path}')
|
||||
|
||||
|
||||
def test15_recieve():
|
||||
"""
|
||||
First start the passive side.
|
||||
"""
|
||||
exec_receive_chunks_passive(
|
||||
command=['cat'],
|
||||
target_chunk_dir=Path('/home/yoda/15'),
|
||||
)
|
||||
|
||||
|
||||
def test15_send():
|
||||
"""
|
||||
Then run the active side.
|
||||
"""
|
||||
exec_send_chunks_active(
|
||||
command=['ls', '/home'],
|
||||
ssh_target='nas',
|
||||
source_chunk_dir=Path('test/15'),
|
||||
target_chunk_dir=Path('/home/yoda/15'),
|
||||
)
|
||||
|
||||
|
||||
def _init(test_number: int):
|
||||
print(f"TEST {test_number}")
|
||||
test_dir = Path('test')
|
||||
|
Loading…
Reference in New Issue
Block a user