Commit Graph

3746 Commits

Author SHA1 Message Date
Daira Hopwood
51f0c4de69 Add missing Deferred creation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:42:35 +01:00
David Stainton
4b049fca56 fix references to notifier 2015-07-21 00:42:35 +01:00
David Stainton
4e714179f9 various pyflakes fixes 2015-07-21 00:42:35 +01:00
Daira Hopwood
7ee8ab4ac7 Add ready method to MockMagicFolder to partially fix a test.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:42:35 +01:00
Daira Hopwood
32cad77b95 Fixes to Magic Folder client initialization.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:42:35 +01:00
David Stainton
31d6430d10 remove some superfluous print statements 2015-07-21 00:42:35 +01:00
David Stainton
8cefb7a680 Fix Alice Bob mock test 2015-07-21 00:42:35 +01:00
David Stainton
4a798883be fix test_persistence 2015-07-21 00:42:35 +01:00
David Stainton
24d71f2f01 fix some tests 2015-07-21 00:42:35 +01:00
David Stainton
8a5c01cdab Fix version deletion propagation and test 2015-07-21 00:42:35 +01:00
David Stainton
5fe1e13120 Add version to magic folder db schema
- also update handling file addition and deletion events
to utilize local and remote version numbers in the uploader...

^ untested so far althought he basic Alice + Bob test continues to pass
2015-07-21 00:42:35 +01:00
David Stainton
bdb4527d85 Add rough naive downloader + remote scan
- makes the basic naive Alice + Bob unit test pass
-  `_should_download` is currently a stub function and
should be implemented
- handling of local+remote file versions is currently faked...
and should be implemented
2015-07-21 00:42:35 +01:00
David Stainton
5d154d2b7a Rename deque to upload deque
here we also rename the pending deque set
to pending upload deque..
2015-07-21 00:42:35 +01:00
David Stainton
239a8653af add partial remote scan implementation 2015-07-21 00:42:35 +01:00
David Stainton
10264dd988 Add magic-folder download callback 2015-07-21 00:42:35 +01:00
David Stainton
4db3adbbd1 Add test for Bob download callback 2015-07-21 00:42:35 +01:00
David Stainton
d1d43d72da Teach Alice to upload file for Alice+Bob test
note: this is not yet working for the mock test; the real
test passes.
2015-07-21 00:42:34 +01:00
David Stainton
df1c93629d teach setup_alice_and_bob to return results in deferred
- however it is terrible that i was unable to set local vars in the callbacks
so i had to use object attributes instead.
2015-07-21 00:42:34 +01:00
David Stainton
a5c0907580 Add cleanup to Alice+Bob test + bug fix
bug fix == don't clobber the alice bob magicfolder instances
2015-07-21 00:42:34 +01:00
David Stainton
a76d3546bc fix the rest of the unit tests 2015-07-21 00:42:34 +01:00
David Stainton
6490bc838b Fix magic-folder cli tests 2015-07-21 00:42:34 +01:00
David Stainton
9378c5f1d4 Add helper to setup Alice and Bob magic-folders
this will help us write unit tests with multiple writers
to the magic-folder...
2015-07-21 00:42:34 +01:00
David Stainton
378756d130 Add test to list remote collective dir
here you can see that i've avoided tampering with many of our
unit tests by making collective_dirnode conditional.
instead perhaps our unit tests should fail if collective_cap
is blank.
2015-07-21 00:42:34 +01:00
David Stainton
ea48edf682 Remove/clean code duplication for CLI unit tests 2015-07-21 00:42:34 +01:00
David Stainton
6046abbb39 Fix magic-folder Persistence test
here we teach this test to create invite join
a magic-folder using the CLI... and then we go
on to fix various bugs.
2015-07-21 00:42:34 +01:00
David Stainton
a2ed2965e3 Teach magic-folder tests to use CLI for creating magic folder config 2015-07-21 00:42:34 +01:00
David Stainton
a3d79bcd6d minor corrections to use of deferred from last commit 2015-07-21 00:42:34 +01:00
David Stainton
035f7cf55d Teach magic-folder cli tests to test join results
- test if the client's dmd's readonly cap is present in the collective
readonly cap
2015-07-21 00:42:34 +01:00
David Stainton
e8de9c3299 Change return values to constants either 0 or -1 2015-07-21 00:42:34 +01:00
David Stainton
868c658d05 Test return vals and fix join return val 2015-07-21 00:42:34 +01:00
David Stainton
d384d4edca Test that join adds tahoe config options 2015-07-21 00:42:34 +01:00
David Stainton
14603bce7c Clean up join tahoe config append 2015-07-21 00:42:34 +01:00
David Stainton
1e710187c4 Add complete usage functionality to create 2015-07-21 00:42:34 +01:00
David Stainton
9deae9b587 Append magic-folder config options to tahoe.cfg 2015-07-21 00:42:34 +01:00
David Stainton
1223cd5610 Implement most of the join command 2015-07-21 00:42:34 +01:00
David Stainton
632e5e1db0 Finish writing the invite implementation 2015-07-21 00:42:34 +01:00
David Stainton
2e96671a48 Fix options passed to mkdir from magic invite
- here we also clean up the magic folder cli unit tests
2015-07-21 00:42:34 +01:00
David Stainton
bf34685ae0 Sleepy time WIP almost got invite's mkdir working... 2015-07-21 00:42:34 +01:00
David Stainton
331dd8bd9d Derive our own node-url, fixes magic-folder create test 2015-07-21 00:42:34 +01:00
David Stainton
cf38deebf7 Add rough create command - test FAILS still however 2015-07-21 00:42:34 +01:00
David Stainton
646fc94cb2 Add basic test for magic-folder create command 2015-07-21 00:42:34 +01:00
David Stainton
8f3c04ab8c Add boiler plate for magic-folder subcommand
here we also:
- add the synopsis for the create command
- add the argument parser for the create command
2015-07-21 00:42:34 +01:00
David Stainton
b448905b50 Use Daira's fix to unblock CLI progress 2015-07-21 00:42:34 +01:00
David Stainton
68fac1ca24 WIP 2015-07-21 00:42:34 +01:00
David Stainton
a845fe6da3 Change behavior upon finding missing files
- Fix test test_magic_folder
- Do not throw exception for missing files...
- Check for entry in magic folder db; only write tahoe metadata
deleted=true if magic folder db entry for file exists.
2015-07-21 00:42:34 +01:00
David Stainton
7c937eabe7 Add check_file_db_exists to backupdb api
- this backupdb utility function checks to if a file's entry
exists in the db but does not stat the file on disk or otherwise
talk to the filesystem
2015-07-21 00:42:34 +01:00
David Stainton
8b20399796 handle local file deletion events 2015-07-21 00:42:34 +01:00
Daira Hopwood
e68b09b081 Rename drop-upload to Magic Folder. fixes ticket:2405
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:42:15 +01:00
Daira Hopwood
3120499069 Remove a debug print.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
Daira Hopwood
567cabc195 Remove unused code.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
Daira Hopwood
d2950aaf62 Fix test errors.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:56 +01:00
David Stainton
5a8503a730 Minor code cleanup 2015-07-21 00:20:56 +01:00
David Stainton
899d8f5742 Add private config magic_folder_parent_dircap
- this commit also updates the tests
2015-07-21 00:20:56 +01:00
Daira Hopwood
1ce31cc9a7 Add parent_dircap stub argument to DropUploader. refs ticket:2441
Author: David Stainton <david@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
1ef48fe868 Add IN_MOVED_FROM to inotify mask.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
b19eb94c7e Explicitly pass overwrite=True to add_file. (It is the default, but this is clearer.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
c27eafcb5c More fixes to drop-upload tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
aaed7ee8d7 Fix drop-upload tests. refs ticket:2427
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
7802d3e350 Fix an incorrect addCallback.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
a2cb04fe7d fileutil: make the error behaviour of replace_file on Unix more similar to Windows.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
3cffe2599e fileutil.py: add rename_no_overwrite and replace_file.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
3854501e4b WIP debugging.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
cd0b360912 Cosmetics.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
David Stainton
184a716a14 WIP 2015-07-21 00:20:55 +01:00
David Stainton
abe591e5f8 fix more inotify test calls 2015-07-21 00:20:55 +01:00
David Stainton
364526fd66 Clean up test at end
this gets rid of the dirty reactor
2015-07-21 00:20:55 +01:00
David Stainton
6aefeb2ea7 Copy all daira code from other branch... 2015-07-21 00:20:55 +01:00
David Stainton
1a5726eda4 Test inotify with event agnostic notify
def notify(self, path, mask)
instead of
def notify_close_write(self, path)
2015-07-21 00:20:55 +01:00
David Stainton
9c4b780c35 Add sleep to test 2015-07-21 00:20:55 +01:00
David Stainton
036b586cfd WIP 2015-07-21 00:20:55 +01:00
Daira Hopwood
f6fbc7255b Disable use of Unicode-mode FilePaths on non-Windows platorms. fixes ticket:2444
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
Daira Hopwood
7223c2821e Teach uploader to use flat hierarchy. refs ticket:2442
Author: David Stainton <david@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:55 +01:00
David Stainton
91dab93b3b Add Magic Folder path encoding. refs ticket:2442 2015-07-21 00:20:55 +01:00
Daira Hopwood
c5916adacd Move backupdb out of scripts. fixes ticket:2408
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:20:48 +01:00
Daira Hopwood
d4a708d16e Process directories unconditionally.
Also pass overwrite=False and suppress ExistingChildError when creating a
subdirectory, to avoid orphaning any existing directory.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
ceb84605b9 autoAdd isn't needed now that we add watches for subdirectories manually.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
ae7808c212 WIP
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
a9ecbba380 Teach uploader to keep object stats, not file stats.
We keep track of objects instead of files so that we are
not forced to determine the object type (file, directory,
symlink, special file etc.)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
39c8b97503 Add ignore count to uploaded callback.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
164b23c399 Teach StorageFarmBroker to fire a deferred when a connection threshold is reached. refs #1449
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
67239ffa9c Enable Windows inotify support.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
1607724c59 New code for Windows drop-upload support. refs #1431
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
5153dff291 Add magic folder db.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
b37478195f Unicode path fixes for drop-upload.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-21 00:19:12 +01:00
Daira Hopwood
c830419e04 Eliminate mock dependency.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-17 22:12:25 +01:00
Daira Hopwood
3ae6ceb6a8 Add Namespace utility class. (This is already used in the leasedb/cloud backend branch.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-17 22:12:25 +01:00
Daira Hopwood
2d7c852ace Bump pyasn1 requirement to >= 0.1.8.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-16 15:38:06 +01:00
Daira Hopwood
baaf2a4a55 Blacklist mock > 1.0.1.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-07-16 15:24:45 +01:00
Brian Warner
28b74b0b74 test/check_load: hush (newer) pyflakes
pyflakes-0.9.2 gets confused about list comprehensions, so rename the
loop variable even though we'd deleted that name already.
2015-07-12 18:25:55 -07:00
Brian Warner
7aedd7c1b2 test_web: avoid IP autodetection, was causing dirty reactor 2015-07-12 18:20:43 -07:00
Daira Hopwood
f18da535c9 Remove packages from not_import_versionable that we now can always version.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-06-02 18:12:23 +01:00
Daira Hopwood
96024d7244 Add OpenSSL version check and tests. refs ticket:2215
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-06-02 18:07:20 +01:00
Brian Warner
45ebbbf44b wrap long lines, and tolerate various-width wrappings of the --help output
test_cli.Help was too sensitive to the way that the --help output was
wrapped, which caused failures on travis when COLUMNS= was set low and
the expected strings were split across separate lines.
2015-05-26 11:40:17 -07:00
Brian Warner
8f41713fe9 cli: improve formatting of all commands
Also:

* do some light refactoring of create-client/node
* make it clear that these commands' --basedir options do the same as
  the global --node-directory option
* use "global-options" instead of "global-opts"
2015-05-26 11:31:06 -07:00
Brian Warner
01619844de scripts: improve rendering of synopsis/usage
Subcommands "--help" is now rendered as:

```
 tahoe [global-options] COMMAND [options] ARGS
 (use 'tahoe --help' to view global options)
 USAGE (flags/options)
 DESCRIPTION
 DESCRIPTION_UNWRAPPED
```

The new .description and .description_unwrapped fields allow
commands (subclasses of twisted.python.usage.Usage) better control over
how their explanations are rendered: the old .longdesc field was wrapped
unpleasantly.
2015-05-26 11:29:49 -07:00
Brian Warner
5d5fa05a42 scripts/runner.py: put command group descriptions in parens 2015-05-26 11:27:57 -07:00
Brian Warner
1c34cbd627 refactor scripts/common.py: move _default_nodedir out to its own file 2015-05-26 11:27:57 -07:00
Zooko
a9b152780e remove dead code: NamedTemporaryDirectory
fixes #2433
2015-05-26 17:20:11 +00:00
Daira Hopwood
143af61518 fileutil.py: use ctypes.get_last_error() instead of GetLastError(). refs #1531
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-18 01:42:01 +01:00
Daira Hopwood
4794666df6 On Windows, the user's home directory may be either %USERPROFILE% or %HOMEDRIVE%%HOMEPATH% depending on the Windows version. fixes ticket:2417
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 14:42:31 +01:00
Daira Hopwood
f973657a6a interfaces.py: fix arguments to create_subdirectory.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 14:21:28 +01:00
Daira Hopwood
5d046c597e drop-upload.py: fix error messages.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 14:21:17 +01:00
Daira Hopwood
0c4acc763b Fix a pyflakes warning.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 14:21:17 +01:00
Daira Hopwood
07aa5e76b5 Retire the setup_requires hack in cases where it isn't needed (and can cause build problems). refs #2286
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 12:49:18 +01:00
Daira Hopwood
d106a77567 _auto_deps.py: update comments. refs #2416
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 12:44:21 +01:00
Daira Hopwood
c2874a7073 Allow working with Twisted >= 13 on Windows if pywin32 is manually installed. fixes #2416
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-05-13 12:44:21 +01:00
Brian Warner
be5d07a70a apply review feedback 2015-05-03 22:14:36 -07:00
Brian Warner
275ddb93cc cp: trailing slash on source filename is an error, just like on targets 2015-05-03 22:14:35 -07:00
Brian Warner
ca23c4fa23 tahoe cp: ignore trailing slash on source arguments
This avoids an error case where an empty child name resulted in a
duplicate mkdir. It adds a precondition check to guard against empty
child names, and some test cases. It also cleans up a funny redundancy
noticed earlier (refs ticket:2329).
2015-05-03 22:13:52 -07:00
Brian Warner
97fd19407d Improve docs on 'cp -r', noting the recent 2329 changes
refs ticket:2329
2015-05-03 21:49:34 -07:00
Brian Warner
341e263e03 control.py: minor improvements
refs ticket:1737
2015-04-28 11:03:12 -07:00
Daira Hopwood
53ced4be8b Change foolscap dependency to >= 0.8.0. refs #2400
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-28 17:21:31 +01:00
Daira Hopwood
e6cede21f2 Fix a test that was dependent on Windows path separators.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-21 21:28:21 +01:00
Daira Hopwood
6bcef565d9 Reduce differences between Windows and non-Windows dependencies.
This also fixes some warnings on Windows when using Twisted 12.1.0.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-21 21:16:29 +01:00
Brian Warner
f0e783e20e fix check-memory test, with new new (safe) control-port methods 2015-04-21 13:05:58 -07:00
Daira Hopwood
eb34e0d625 Ensure the 'base' argument to abspath_expanduser_unicode takes effect on Windows. fixes #2398
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-21 21:04:20 +01:00
Brian Warner
edcdaa2799 finish removing control-port upload/download functions 2015-04-21 11:26:16 -07:00
Brian Warner
2eea4e9a07 remove control-port upload/download file interfaces
FURLs are unguessable, but an attacker who somehow learned this FURL
could overwrite files and read sensitive data.

This will break the memory tests. I will add a new interface to support
the memory tests soon.

refs ticket:1737
2015-04-21 11:13:17 -07:00
Daira Hopwood
45c1dc7e63 backupdb.py: cosmetics
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-17 22:31:01 +01:00
Daira Hopwood
6e9a602df6 Make backupdb use dbutil.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-17 22:30:47 +01:00
Daira Hopwood
769de61a90 Add util/dbutil.py: open/create/update sqlite databases given some schema.
Author: Brian Warner <warner@lothar.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-17 18:11:10 +01:00
Daira Hopwood
4de4e0e65e Some useful Deferred utilities, originally from the cloud backend branch.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-04-17 18:10:21 +01:00
Brian Warner
eda00a5c58 typo 2015-03-31 11:07:21 -07:00
Brian Warner
cc68a81326 bump Twisted dep to 11.1.0, thus simplify IntishPermissions 2015-03-31 11:06:14 -07:00
Brian Warner
b36903d02c test_ftp: fix comparison against integer 2015-03-31 11:06:14 -07:00
Brian Warner
26c8abadec Fix ftp 'ls' to work with current Twisted-15.0.0
refs ticket:2394

It's kind of a hack, but Twisted changed the API and I couldn't find a
cleaner way to detect which form of "permissions" value the Twisted FTP
server wants.

I've manually tested it against 14.0.2 and 15.0.0.
2015-03-31 11:06:14 -07:00
Brian Warner
2d3c805a90 use more servers for test_mutable.Update, to test #2034 properly 2015-03-25 18:49:37 -07:00
Daira Hopwood
b6be693cbe Add a test, add missing imports. refs #2388
This tests ftpd, but not sftpd. Doing this sort of test on sftpd
requires the creation of a valid pubkey/privkey file pair, which is more
work than I want to do right now.

init_ftp/init_sftp were changed to interpret the configured
accounts.file as relative to the node's basedir, with
abspath_expanduser_unicode(accountfile, base=self.basedir).
This would happen naturally in a real node, since it os.chdir()s
to the basedir before doing anything. But tests don't do that.

Author: Brian Warner <warner@lothar.com>
Author: Daira Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-03-24 17:10:00 +00:00
Daira Hopwood
3066039f0f Ensure that path parameters to SFTPServer and FTPServer constructors are unicode. refs #2388
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-03-24 16:46:40 +00:00
Daira Hopwood
21226cbb82 Add from_utf8_or_none and tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-03-24 16:46:40 +00:00
Brian Warner
681eb4d12e check_memory.py: announce 32-bit vs 64-bit 2015-03-19 18:59:16 -07:00
Brian Warner
3dd7142c42 test_cli_cp.py: hush pyflakes 2015-03-17 11:16:06 -07:00
Brian Warner
48da2cd99b tahoe_cp: be consistent with "source.basename() is None" testing 2015-03-17 11:13:57 -07:00
Brian Warner
190743e066 tahoe_cp: minor cleanups, no behavior changes 2015-03-17 11:13:33 -07:00
Brian Warner
1838fe8eaf tahoe_cp: make populate(recurse=) more explicit 2015-03-17 11:11:11 -07:00
Brian Warner
f508a98622 test_cli_cp: test cleanups
* remove redundant test cases
* add more internal asserts
* clean up set usage
2015-03-17 10:41:01 -07:00
Brian Warner
415b7b7bca test_cli_cp: improve test cases 2015-03-17 09:59:34 -07:00
Brian Warner
f3a9be1c5e improve error message for slash-terminated non-directories 2015-03-10 09:17:17 -07:00
Brian Warner
e80697da1b test_cli_cp.py: turn off debug mode, tests now assert for real 2015-03-03 18:20:03 -08:00
Brian Warner
2a361bc46f tahoe cp: overhaul target assignment, update tests
This substantially changes the internals of "tahoe cp", to behave in
accordance with the scheme developed in ticket:2329. test_cli_cp.py got
a large new test to exercise all the various combinations. This also
changes the set of error messages that "tahoe cp" can produce.

This modifies try_copy(), inserts a new implementation of
copy_things_to_directory() (and supporting methods), and fixes a few
bugs elsewhere.

fixes ticket:2329
2015-03-03 18:19:58 -08:00
Brian Warner
ca92bfdc88 tahoe_cp: delete copy_to_directory() code
This code will be replaced in the next commit with an entirely different
approach, and modifying it in a single commit would yield a completely
unreadable diff.
2015-03-03 18:18:17 -08:00
Brian Warner
c32c8794bc tahoe_cp: simplify some checks, rename some functions
no behavioral changes
2015-03-03 18:03:17 -08:00
Brian Warner
6d84cdd35d tahoe_cp.py: use s.basename() instead of tracking it separately 2015-02-24 02:07:57 -08:00
Brian Warner
98ec466d54 tahoe_cp.py: store basename in the Source instance 2015-02-24 01:55:53 -08:00
Brian Warner
be4b13c318 test_cli.py: split the largest test classes out into separate files
That file was getting unruly. No behavioral changes, apart from tests
now having different names.
2015-02-24 01:41:23 -08:00
Daira Hopwood
5a37ff0d0e Discourage future readers of iputil.py from using Win32 APIs in preference to route.exe.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-19 17:41:09 +00:00
Daira Hopwood
c5817c3ce3 It is Twisted 12.2.0 that starts depending on pywin32 for endpoints, not Twisted 12.3.0.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-17 19:11:57 +00:00
Daira Hopwood
0b24756cc7 Allow multiple occurrences of AUTO. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:31:10 +00:00
Daira Hopwood
759512da28 Add tests for combining autodetected and statically configured locations. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00
Daira Hopwood
10ebbeebaa test_node.py: refactor test_location* to reduce code duplication. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00