Daira Hopwood
643a105991
URIs are strs.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
59eede8e88
Aliases and nicknames are Unicode.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
bb596b017d
Fix call to argv_to_abspath. Also rename localdir to local_dir.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
b32b61e727
Fix magic-folder cli tests
...
convert path to abs path when matching
strings in the generated config file.
2016-07-21 12:35:59 -07:00
David Stainton
a1beef34a7
Attempt to fix cli tests
2016-07-21 12:35:59 -07:00
Daira Hopwood
b2d494837c
Better but still broken tests.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
903c6f1d6c
Fix check for initial '-' in argv_to_abspath.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
0789d295a6
Fix tests by submitting unicode args instead of str
2016-07-21 12:35:59 -07:00
David Stainton
16275cb8f6
Teach magic-folder join to use argv_to_abspath
...
- also we modify argv_to_abspath to through a usage error
if the name starts with a '-'
- add a test
currently the tests fail
2016-07-21 12:35:59 -07:00
David Stainton
941f67f3b0
Use argv_to_abspath for magic-folder join file path arg
2016-07-21 12:35:59 -07:00
Daira Hopwood
5f6783e382
Test creation of a subdirectory.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
8184ed4414
Watch for IN_CREATE events but filter them out for non-directories.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
ee5245ed2c
Patch Downloader.REMOTE_SCAN_INTERVAL rather than setting it persistently.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
cbec939d86
Implement creating local directories in downloader.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
60ab5a057a
Decode names in the scanned remote.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
a3fa1617c2
Refactoring to allow logging from _write_downloaded_file and _rename_conflicted_file.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
6cb41cadf5
Simplify and fix non-existent-file handling.
...
Also make the existent and non-existent cases as similar as possible,
with a view to merging them.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
cb905d8d97
Logging/debugging improvements.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
fc3513d172
Refactor and fix race conditions in test_alice_bob.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
ac5730ea1c
Correct a call to did_upload_version in the downloader.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
8a6dae6d59
Make sure that test_move_tree waits until files have been uploaded as well as downloaded.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
28587b5b2a
Restore a call to increment files_uploaded that was mistakenly removed.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
2fcaa8c2b2
Teach uploader+downloader to use to db schema
...
here we attempt to fix all the unit tests as well...
however two tests still fail
2016-07-21 12:35:59 -07:00
Daira Hopwood
5754c01cb5
Add magicfolderdb.py.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
615859acc1
Remove magic-folder db code from backupdb.py
2016-07-21 12:35:59 -07:00
David Stainton
e2cee9ba2a
WIP
2016-07-21 12:35:59 -07:00
David Stainton
3c50764486
Minor comment correction for get_all_relpaths
2016-07-21 12:35:59 -07:00
David Stainton
f8bb229ab7
For all downloaded files ensure parent dir exists
2016-07-21 12:35:59 -07:00
Daira Hopwood
c2d672e0b6
Simplify the cleanup_Alice_and_Bob callback.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
meejah
94a2ef0095
Make downloader delay a class-variable
...
This gives the integration-style CLI-based tests a chance
to set the delay to 0 before the first 3-second delayed
call is queued to _lazy_tail in the Downloader
2016-07-21 12:35:59 -07:00
meejah
9aecfed421
Teach unit-tests to time-warp
...
1. Split alice/bob clocks to avoid races conditions
in the tests
2. Wrap ._notify so we can advance the clock after inotify
calls in the RealTest (since it takes >0ms to do the "real" notifies)
2016-07-21 12:35:59 -07:00
meejah
4ed2fb725a
Fix call to ready()
2016-07-21 12:35:59 -07:00
Daira Hopwood
31ab5cf4ed
Correct a string-type error.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
e03a1e3361
WIP.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
262e238a7d
Magic Folder file moves.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
3170cab0fc
Prepare to move drop_upload.py to magic_folder.py.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
76a178969d
Move backupdb.py to src/allmydata.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
976c89d2e4
Rename upload_ready_d to connected_enough_d.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
5f143f7635
Enable Windows inotify support.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
e7fb665e06
New code for Windows drop-upload support. refs #1431
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
61b3a9cef2
Add magic folder db.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
7b4067850f
Unicode path fixes for drop-upload.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Brian Warner
b6dedc6223
clean up got_static_announcement() call
2016-07-19 17:31:43 -07:00
Brian Warner
2c5f7ed425
factor out yamlutil.py
...
The yaml.SafeLoader.add_constructor() should probably only be done once,
and moving this all into a module gives us an opportunity to test it
directly.
2016-07-19 17:31:41 -07:00
Brian Warner
9c1e22209f
client.py: add missing import, fix wrong name
...
Without these, clients with a non-empty connections.yaml would crash as
they start up. It's safe to say we need some tests for this :-).
pyflakes catches all of these, but it got accidentally disabled
recently, so travis wasn't running it. I'll fix that in the next commit.
2016-07-19 17:30:45 -07:00
David Stainton
9063106f3a
Change 'servers' sections of connections.yaml to support new design in #2788
2016-07-12 17:44:21 +01:00
David Stainton
a67e7c0db9
Remove old self.testing reference and conditional
2016-07-12 17:44:21 +01:00
David Stainton
e4d93a745c
Load static server configuration from connections.yaml
2016-07-12 17:44:21 +01:00
Brian Warner
7d692d0afd
Split control and log to two separate tubs, remove control knobs.
...
This also removes the tahoe.cfg keys that would have configured the
control-port. And it deletes the logport.furl file before asking the Tub
to re-create it, because we're now using an ephemeral Tub (so we're not
persisting the private key, so the tubid will change each time).
closes ticket:2794
2016-07-06 21:09:35 -07:00
David Stainton
e5ffbdbcdf
Move control/logging to a separate Tub
2016-07-06 21:09:35 -07:00