From 44f88601fba899c8e7e398442f661ebc5ca8d84c Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sun, 19 Mar 2023 19:26:11 +0100 Subject: [PATCH] add test --- src/subprocess_util/test.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/subprocess_util/test.py b/src/subprocess_util/test.py index b4dd78b..ad7df1d 100644 --- a/src/subprocess_util/test.py +++ b/src/subprocess_util/test.py @@ -21,10 +21,9 @@ def test(): # test12() # test13() # test14() - - test15_recieve() - test15_send() - + # test15_recieve() + # test15_send() + test16() def test1(): _init(1) @@ -194,6 +193,19 @@ def test15_send(): ) +def test16(): + """ + Minimal example to replicate a BTRFS subvolume with an active sending side. + """ + child_path = '/mnt/backup/snap/blogger.privacy1st.de/20230104T2255' + ssh_target = 'rootnas' + target_path = '/mnt/data/test/blogger.privacy1st.de/20230104T2255' + print(f'nas: ' + f'sudo btrfs-receive-chunks-passive {target_path}') + print(f'odroid: ' + f'sudo btrfs-send-chunks-active {child_path} {ssh_target} {target_path}') + + def _init(test_number: int): print(f"TEST {test_number}") test_dir = Path('test')