Commit Graph

6225 Commits

Author SHA1 Message Date
David Stainton
aa4a3c2da4 Fix magic-folder cli tests
convert path to abs path when matching
strings in the generated config file.
2015-10-20 14:27:05 +02:00
David Stainton
2e587937c1 Attempt to fix cli tests 2015-10-20 13:08:14 +02:00
Daira Hopwood
b032ab829f Better but still broken tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-19 18:25:02 +01:00
Daira Hopwood
588002a8b1 Fix check for initial '-' in argv_to_abspath.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-19 18:24:33 +01:00
David Stainton
09871d76c7 Fix tests by submitting unicode args instead of str 2015-10-19 16:14:12 +02:00
David Stainton
ef39ca17ba 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
2015-10-19 16:02:28 +02:00
David Stainton
3367b40990 Use argv_to_abspath for magic-folder join file path arg 2015-10-19 14:14:32 +02:00
Daira Hopwood
fb55baa91b Test creation of a subdirectory.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 20:39:39 +01:00
Daira Hopwood
58388bebf1 Watch for IN_CREATE events but filter them out for non-directories.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 16:21:50 +01:00
Daira Hopwood
5297f99116 Patch Downloader.REMOTE_SCAN_INTERVAL rather than setting it persistently.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 03:27:59 +01:00
Daira Hopwood
07b80cf669 Implement creating local directories in downloader.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 03:27:20 +01:00
Daira Hopwood
dad9b11853 Decode names in the scanned remote.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 03:25:45 +01:00
Daira Hopwood
8c8d1885ce Refactoring to allow logging from _write_downloaded_file and _rename_conflicted_file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-16 03:24:46 +01:00
Daira Hopwood
8348913b8a 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>
2015-10-15 23:02:30 +01:00
Daira Hopwood
1d0e2b5cda Logging/debugging improvements.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-15 23:02:07 +01:00
Daira Hopwood
768b478cb9 Refactor and fix race conditions in test_alice_bob.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-15 22:56:38 +01:00
Daira Hopwood
257da9f86d Correct a call to did_upload_version in the downloader.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-13 15:56:31 +01:00
Daira Hopwood
fd506bd550 Make sure that test_move_tree waits until files have been uploaded as well as downloaded.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-13 15:56:00 +01:00
Daira Hopwood
6945b85ce7 Restore a call to increment files_uploaded that was mistakenly removed.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-13 15:55:00 +01:00
David Stainton
37269740dd Teach uploader+downloader to use to db schema
here we attempt to fix all the unit tests as well...
however two tests still fail
2015-10-12 20:07:39 +02:00
Daira Hopwood
2342393d8a Add magicfolderdb.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-08 16:02:34 +01:00
David Stainton
c82f977fb7 Remove magic-folder db code from backupdb.py 2015-10-08 16:02:34 +01:00
David Stainton
f819aa5b5d WIP 2015-10-08 16:02:34 +01:00
David Stainton
70c623d7d3 Include brief summary of magic-folder CLI commands 2015-10-08 16:02:34 +01:00
David Stainton
7868f0b400 Add link to our cli design doc 2015-10-08 16:02:34 +01:00
David Stainton
fd34630218 Mention gc is not part of the otf grant and link to the gc ticket 2015-10-08 16:02:34 +01:00
David Stainton
30feb122c5 Remove old obsolete/inaccurate statements 2015-10-08 16:02:34 +01:00
David Stainton
5d7d2febc6 Minor comment correction for get_all_relpaths 2015-10-08 16:02:34 +01:00
David Stainton
531747303d For all downloaded files ensure parent dir exists 2015-10-08 16:02:34 +01:00
Daira Hopwood
27fb403dad Simplify the cleanup_Alice_and_Bob callback.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-08 14:54:39 +01:00
meejah
1377aecbd7 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
2015-10-08 14:54:39 +01:00
meejah
906d3da819 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)
2015-10-08 14:54:39 +01:00
Daira Hopwood
bfbc20f40b Merge pull request #193 from meejah/2438.magic-folder-stable.3
Fix call to ready()
2015-10-08 14:07:05 +01:00
meejah
c398218c55 Fix call to ready() 2015-10-06 14:11:32 -06:00
Daira Hopwood
0b5039d253 Correct a string-type error.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-02 22:08:54 +01:00
Daira Hopwood
3180471ce8 WIP.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:40:10 +01:00
Daira Hopwood
27ed601cef Magic Folder file moves.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:36:18 +01:00
Daira Hopwood
df044f884c Prepare to move drop_upload.py to magic_folder.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
71ec32373a Move backupdb.py to src/allmydata.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
2b17d88644 Rename upload_ready_d to connected_enough_d.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
00159ecd06 Documentation changes for Magic Folder.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
e7d4e3d4a9 Teach StorageFarmBroker to fire a deferred when a connection threshold is reached. refs #1449
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
dc49a1e511 Enable Windows inotify support.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:32 +01:00
Daira Hopwood
6e64ab563b New code for Windows drop-upload support. refs #1431
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:31 +01:00
Daira Hopwood
b417ae76a6 Docs for drop-upload on Windows.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:31 +01:00
Daira Hopwood
81e6a12779 Add magic folder db.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:31 +01:00
Daira Hopwood
30d7d8a501 Unicode path fixes for drop-upload.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 22:25:31 +01:00
Daira Hopwood
4c55e68ff8 .travis.yml: pin coverage version to 3.7.1. fixes ticket:2511
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-10-01 01:11:14 +01:00
Brian Warner
1ffc6534bd Merge branch '2510-new-foolscap' 2015-09-22 21:30:03 -07:00
Brian Warner
67dcedd8df introweb: fix connection hints for server announcements
A long time ago, the introducer's status web page would show the
advertised IP addresses for all published services, by parsing their
FURL's connection hints. This hasn't worked since about 12-Aug-2014 when
foolscap-0.6.5 changed the internal format of these hints (the column
has been empty this whole time).

This removes the "Advertised IPs" column from the Service Announcements
table. Instead, the service's full connection hints (not just the IP
address) is displayed in a tooltip/popup on the "Announced" timestamp
column.

The code that pulls these connection hints is now tolerant of all three
foolscap styles:

* foolscap<=0.6.4 : tuples of ("ipv4",host,port)
* 0.6.5 .. 0.8.0  : tuples of ("tcp",host,port)
* foolscap>=0.9.0 : strings

fixes ticket:2510
2015-09-22 17:19:52 -07:00