Debian Codegraph @

testsuite/daemon-gzip-upload_test.py

raw symbols SCIP
1 #!/usr/bin/env python3
2 # Python rewrite of testsuite/daemon-gzip-upload.test.
3 #
4 # Upload a file tree over a compressed connection to a test daemon.
5 # Exercises (exorcises?) a bug in 2.5.3 that mis-handled doubly-compressed
6 # transfers. Uses the secure stdio-pipe transport by default; --use-tcp
7 # runs it against a real loopback rsyncd.
8
9 from rsyncfns import (
10 CHKDIR, FROMDIR, TODIR,
11 build_rsyncd_conf, checkit, hands_setup, run_rsync, start_test_daemon,
12 )
13
14
15 DAEMON_PORT = 12880
16
17 conf = build_rsyncd_conf()
18 hands_setup()
19
20 # chkdir: vanilla copy minus the daemon's global "foobar.baz" exclude.
21 run_rsync('-av', '--exclude=foobar.baz', f'{FROMDIR}/', f'{CHKDIR}/')
22
23 url = start_test_daemon(conf, DAEMON_PORT)
24
25 checkit(
26 ['-avvvvzz', f'{FROMDIR}/', f'{url}test-to/'],
27 CHKDIR, TODIR,
28 allowed_codes=(0, 23),
29 )