Kevan Carstensen
5becaf0309
test/test_upload.py: changes to test plumbing for #1117 tests
...
- Add a callRemoteOnly method to FakeBucketWriter.
- Change the abort method in FakeBucketWriter to not return a
RuntimeError.
2010-07-15 16:18:20 -07:00
Kevan Carstensen
6d2c216b8f
immutable/upload.py: abort buckets if peer selection fails
2010-07-15 16:17:14 -07:00
david-sarah
638a3b2af4
test_encodingutil: correct an error in the previous patch to StdlibUnicode.test_open_representable.
2010-07-18 08:14:20 -07:00
david-sarah
74c41ebb8b
test_dirnode and test_web: don't use failUnlessReallyEqual in cases where the return type from simplejson.loads can vary between unicode and str. Use to_str when comparing URIs parsed from JSON.
2010-07-18 07:29:15 -07:00
david-sarah
9a4a864573
test_encodingutil: StdlibUnicode.test_open_representable no longer uses a mock.
2010-07-18 05:54:12 -07:00
Zooko O'Whielacronx
7cc98759bd
docs: add comment clarifying #1051
2010-07-17 22:32:50 -07:00
david-sarah
d346e0853d
Add tests of caps from the future that have non-ASCII characters in them (encoded as UTF-8). The changes to test_uri.py, test_client.py, and test_dirnode.py add tests of non-ASCII future caps in addition to the current tests. The changes to test_web.py just replace the tests of all-ASCII future caps with tests of non-ASCII future caps. We also change uses of failUnlessEqual to failUnlessReallyEqual, in order to catch cases where the type of a string is not as expected.
2010-07-11 13:02:52 -07:00
Zooko O'Whielacronx
3c4fe0706f
M-x whitespace-cleanup
2010-07-17 20:27:39 -07:00
Zooko O'Whielacronx
6a7023efbe
benchmarking: update bench_dirnode.py to reflect the new directory interfaces
2010-07-17 20:17:10 -07:00
david-sarah
bdb10553eb
test_encodingutil: fix test_open_representable, which is only valid when run on a platform for which we know an unrepresentable filename.
2010-07-17 20:03:33 -07:00
francois
968edfda11
iputil.py: Add support for FreeBSD 7,8 and 9
...
committed by: zooko@zooko.com
date: 2010-07-17
and I also patched: NEWS and CREDITS
2010-07-17 19:28:32 -07:00
david-sarah
752897450d
fileutil: docstrings for non-obvious usage restrictions on methods of EncryptedTemporaryFile.
2010-07-16 22:46:47 -07:00
david-sarah
05022dca36
Move EncryptedTemporaryFile from SFTP frontend to allmydata.util.fileutil, and make the FTP frontend also use it (fixing #1083 ).
2010-07-11 14:37:21 -07:00
david-sarah
a8161c915a
Correct stringutils->encodingutil patch to be the newer version, rather than the old version that was committed in error.
2010-07-17 18:34:35 -07:00
david-sarah
0d79a4a7d1
test_cli.py: fix error that crept in when rebasing the patch for #1072 .
2010-07-17 17:01:23 -07:00
david-sarah
c59f9b162f
stringutils: add test for when sys.stdout has no encoding attribute ( fixes #1099 ).
2010-07-16 21:58:16 -07:00
david-sarah
8090785716
CLI: add 'tahoe unlink' as an alias to 'tahoe rm', for forward-compatibility.
2010-07-17 15:04:11 -07:00
Zooko O'Whielacronx
6e8477114e
minor code clean-up in dirnode.py
...
Impose micro-POLA by passing only the writekey instead of the whole node object to {{{_encrypt_rw_uri()}}}. Remove DummyImmutableFileNode in nodemaker.py, which is obviated by this. Add micro-optimization by precomputing the netstring of the empty string and branching on whether the writekey is present or not outside of {{{_encrypt_rw_uri()}}}. Add doc about writekey to docstring.
fixes #967
2010-07-13 23:02:55 -07:00
david-sarah
11077ea74d
Rename stringutils to encodingutil, and drop listdir_unicode and open_unicode (since the Python stdlib functions work fine with Unicode paths). Also move some utility functions to fileutil.
2010-07-11 17:30:15 -07:00
david-sarah
fa0fd66e17
Allow URIs passed in the initial JSON for t=mkdir-with-children, t=mkdir-immutable to be Unicode. Also pass the name of each child into nodemaker.create_from_cap for error reporting.
2010-07-11 12:55:25 -07:00
david-sarah
e2ef2c2691
cli.py: make command descriptions consistently end with a full stop.
2010-07-13 18:45:38 -07:00
david-sarah
15ddab08ed
SFTP: address some of the comments in zooko's review ( #1106 ).
2010-07-11 19:55:37 -07:00
david-sarah
3b1b0147a8
test_storage.py: potential fix for failures when logging is enabled.
1970-07-12 21:05:46 -07:00
terrellrussell
d0381e679e
upcase_since_on_welcome
2010-07-08 12:39:03 -07:00
freestorm77
35ec8f6ac2
server_version_on_welcome_page.dpatch.txt
...
- The storage server version is 0 for all storage nodes in the Welcome Page
2010-06-05 12:17:21 -07:00
freestorm77
496b91717a
directory_html_top_banner.dpatch
...
The div tag with the link "Return to Welcome page" on the directory.xhtml page is not correct
2010-06-22 13:53:01 -07:00
freestorm77
eb63ba9a26
tahoe_css_toolbar.dpatch
...
CSS modification to be correctly diplayed with Internet Explorer 8
The links on the top of page directory.xhtml are not diplayed in the same line as display with Firefox.
2010-06-22 14:00:46 -07:00
freestorm77
97579af73c
runnin_test_tahoe_css.dpatch
...
Runnin test for changes in tahoe.css file
2010-06-22 14:47:14 -07:00
freestorm77
0304918a77
runnin_test_directory_xhtml.dpatch
...
Runnin test for diretory.xhtml top banner
2010-06-22 13:14:03 -07:00
david-sarah
b8df25a8d1
stringutils.py: tolerate sys.stdout having no 'encoding' attribute.
2010-06-25 21:08:17 -07:00
david-sarah
88169328be
SFTP: don't call .stopProducing on the producer registered with OverwriteableFileConsumer (which breaks with warner's new downloader).
2010-06-28 16:19:26 -07:00
Zooko O'Whielacronx
ab80719198
trivial: tiny update to in-line comment
...
(I'm actually committing this patch as a test of the new eager-annotation-computation of trac-darcs.)
2010-06-13 21:57:15 -07:00
david-sarah
6b2f99fa9a
test_backupdb.py: skip test_unicode if we can't represent the test filenames.
2010-06-18 19:26:20 -07:00
david-sarah
a2caf6f4b2
test_web.py: correct a test that was missed in the change to not write ctime/mtime.
2010-06-18 19:17:18 -07:00
david-sarah
4712875193
dirnode.py: stop writing 'ctime' and 'mtime' fields. Includes documentation and test changes.
2010-06-18 16:01:19 -07:00
david-sarah
72e395d878
test_storage.py: print more information on test failures.
2010-06-16 20:46:23 -07:00
david-sarah
390fc78a9a
test_cli.py: fix test failure in CLI.test_listdir_unicode_good due to filenames returned from listdir_unicode no longer being normalized.
2010-06-17 21:51:10 -07:00
david-sarah
178401eb4e
tahoe backup: unicode tests.
2010-06-17 20:52:11 -07:00
david-sarah
1a0674bf37
CLI: allow Unicode patterns in exclude option to 'tahoe backup'.
2010-06-16 20:39:01 -07:00
david-sarah
a9fe3792de
dirnodes: fix normalization hole where childnames in directories created by nodemaker.create_mutable/immutable_directory would not be normalized. Add a test that we normalize names coming out of a directory.
2010-06-17 17:02:49 -07:00
david-sarah
718870a796
dirnode.py: comments about normalization changes.
2010-06-16 21:14:11 -07:00
david-sarah
7e7644589a
stringutils.py: remove unused import.
2010-06-16 20:44:40 -07:00
david-sarah
5ada31034b
test_stringutils.py: take account of the output of listdir_unicode no longer being normalized. Also use Unicode escapes, not UTF-8.
2010-06-16 20:44:09 -07:00
david-sarah
025aede9e4
test_dirnode.py: partial tests for normalization changes.
2010-06-16 20:40:25 -07:00
david-sarah
c1412c8a81
SFTP: get 'ctime' attribute from 'tahoe:linkmotime'.
2010-06-16 20:37:44 -07:00
david-sarah
9f5488b2d1
stringutils.py: don't NFC-normalize the output of listdir_unicode.
2010-06-16 18:55:37 -07:00
david-sarah
e2c7ad1d88
stringutils.py: Add encoding argument to quote_output. Also work around a bug in locale.getpreferredencoding on older Pythons.
2010-06-15 21:20:12 -07:00
david-sarah
c8d99b77a3
Provisional patch to NFC-normalize filenames going in and out of Tahoe directories.
2010-06-15 20:14:50 -07:00
david-sarah
408b12a7e6
test_system.py: investigate failure in allmydata.test.test_system.SystemTest.test_upload_and_download_random_key due to bytes_sent not being an int
2010-06-15 17:16:48 -07:00
david-sarah
a3acb2b773
SFTP: remove a dubious use of 'pragma: no cover'.
2010-06-13 09:43:56 -07:00
david-sarah
11e88c340a
SFTP: test that renaming onto a just-opened file fails.
2010-06-11 20:37:09 -07:00
david-sarah
b67f8b66c8
SFTP: further small improvements to test coverage. Also ensure that after a test failure, later tests don't fail spuriously due to the checks for heisenfile leaks.
2010-06-11 20:07:37 -07:00
david-sarah
b4e074d250
SFTP: further improve test coverage (paths containing '.', bad data for posix-rename extension, and error in test of openShell).
2010-06-11 14:31:42 -07:00
david-sarah
52f87904ed
SFTP: improve test coverage for no-write on mutable files, and check for heisenfile table leaks in all relevant tests. Delete test_memory_leak since it is now redundant.
2010-06-11 13:57:52 -07:00
david-sarah
546c3d2ed4
SFTP: add test for extension of file opened with FXF_APPEND.
2010-06-10 11:26:47 -07:00
Zooko O'Whielacronx
f19c240ca8
tests: bump up the timeout on this iputil test from 2s to 4s
2010-06-09 07:30:17 -07:00
david-sarah
3c44389440
SFTP: fix most significant memory leak described in #1045 (due to a file being added to all_heisenfiles under more than one direntry when renamed).
2010-06-09 01:00:03 -07:00
david-sarah
5786874d38
test_stringutils.py: Fix test failure on CentOS builder, possibly Python 2.4.3-related.
2010-06-08 23:50:56 -07:00
david-sarah
ffd1c5aca5
Fix for Unicode-related test failures on Zooko's OS X 10.6 machine.
2010-06-08 22:54:48 -07:00
david-sarah
80a89d3931
stringutils.py, sftpd.py: Portability fixes for Python <= 2.5.
2010-06-08 18:33:02 -07:00
david-sarah
32d9deace3
Back out Windows-specific Unicode argument support for v1.7.
2010-06-08 17:08:03 -07:00
david-sarah
4b5927fdb8
SFTP: suppress NoSuchChildError if heisenfile attributes have been updated in setAttrs, in the case where the parent is available.
2010-06-07 23:37:53 -07:00
david-sarah
195b4afa8f
SFTP: ignore permissions when opening a file (needed for sshfs interoperability).
2010-06-07 22:57:00 -07:00
david-sarah
a67e745b26
test_web.py: fix pyflakes warnings introduced by byterange patch.
2010-06-07 21:20:12 -07:00
Jeremy Fitzhardinge
63b28d707b
Improve HTTP/1.1 byterange handling
...
Fix parsing of a Range: header to support:
- multiple ranges (parsed, but not returned)
- suffix byte ranges ("-2139")
- correct handling of incorrectly formatted range headers
(correct behaviour is to ignore the header and return the full
file)
- return appropriate error for ranges outside the file
Multiple ranges are parsed, but only the first range is returned.
Returning multiple ranges requires using the multipart/byterange
content type.
2010-03-09 20:59:13 -07:00
Zooko O'Whielacronx
d13784b649
tests: bump up the timeout on these tests; MM's buildslave is sometimes extremely slow on tests, but it will complete them if given enough time. MM is working on making that buildslave more predictable in how long it takes to run tests.
2010-06-07 20:37:54 -07:00
david-sarah
3c883e6e44
test_cli.py: remove invalid 'test_listdir_unicode_bad' test.
2010-06-07 11:37:30 -07:00
david-sarah
71f8757bd1
check_memory.py: adapt to servers-of-happiness changes.
2010-06-07 18:35:28 -07:00
david-sarah
7092de1b6f
Remove the 'tahoe debug consolidate' subcommand.
2010-06-07 11:37:57 -07:00
david-sarah
731e3d68df
common_http.py, tahoe_cp.py: Fix an error in calling the superclass constructor in HTTPError and MissingSourceError (introduced by the Unicode fixes).
2010-06-07 10:47:14 -07:00
Zooko O'Whielacronx
faade8b20a
tests: drastically increase timeout of this very time-consuming test in honor of François's ARM box
2010-06-07 04:59:29 -07:00
david-sarah
8b014372b1
test_stringutils.py: trivial error in exception message for skipped test.
2010-06-06 23:14:55 -07:00
david-sarah
529c9f673a
More Unicode test fixes.
2010-06-06 22:33:58 -07:00
david-sarah
65b6f4e3ce
Unicode fixes for platforms with non-native-Unicode filesystems.
2010-06-06 21:32:38 -07:00
david-sarah
80252debcd
Unicode fixes.
2010-06-06 18:02:15 -07:00
Zooko O'Whielacronx
5bcca5151e
unicode tests: fix missing import
2010-06-04 07:26:30 -07:00
Zooko O'Whielacronx
db8a6f3aa6
unicode: make test_cli test a non-ascii argument, and make the fallback term encoding be locale.getpreferredencoding()
2010-06-04 07:12:51 -07:00
Zooko O'Whielacronx
442008a690
unicode: always decode json manifest as utf-8 then encode for stdout
...
pyflakes pointed out that the exception handler fallback called an un-imported function, showing that the fallback wasn't being exercised.
I'm not 100% sure that this patch is right and would appreciate François or someone reviewing it.
2010-06-04 01:48:40 -07:00
Zooko O'Whielacronx
952f3bf3ef
fix flakes
2010-06-04 00:58:45 -07:00
Zooko O'Whielacronx
08058c1073
fix syntax of assertion handling that isn't portable to older versions of Python
2010-06-04 00:58:05 -07:00
Francois Deppierraz
0eb4d83937
test_stringutils.py: Skip test test_listdir_unicode_good if filesystem supports only ASCII filenames
2010-05-21 09:08:39 -07:00
Francois Deppierraz
01da7f06e6
test_stringutils.py: Skip test_listdir_unicode on mocked platform which cannot store non-ASCII filenames
2010-05-21 09:05:59 -07:00
Francois Deppierraz
58e9df9f5a
test_stringutils.py: Add a test class for OpenBSD 4.1 with LANG=C
2010-05-21 07:00:53 -07:00
Francois Deppierraz
1aeff62161
test_stringutils.py: Mock the open() call in test_open_unicode
...
This test ensure that open(a_unicode_string) is used on Unicode platforms
(Windows or MacOS X) and that open(a_correctly_encoded_bytestring) on other
platforms such as Unix.
2010-05-21 06:58:17 -07:00
Francois Deppierraz
eecaaca6b7
test_stringutils.py: Fix a trivial Python 2.4 syntax incompatibility
2010-05-21 02:33:45 -07:00
Francois Deppierraz
6c70fb7b3c
test_cli.py: Fix tests when sys.stdout.encoding=None and refactor this code into functions
2010-05-20 01:44:47 -07:00
Francois Deppierraz
496802420e
Fix handling of correctly encoded unicode filenames ( #534 )
...
Tahoe CLI commands working on local files, for instance 'tahoe cp' or 'tahoe
backup', have been improved to correctly handle filenames containing non-ASCII
characters.
In the case where Tahoe encounters a filename which cannot be decoded using the
system encoding, an error will be returned and the operation will fail. Under
Linux, this typically happens when the filesystem contains filenames encoded
with another encoding, for instance latin1, than the system locale, for
instance UTF-8. In such case, you'll need to fix your system with tools such
as 'convmv' before using Tahoe CLI.
All CLI commands have been improved to support non-ASCII parameters such as
filenames and aliases on all supported Operating Systems except Windows as of
now.
2010-05-19 17:43:56 -07:00
Francois Deppierraz
d0ed14e1bb
stringutils.py: Unicode helper functions + associated tests
...
This file contains a bunch of helper functions which converts
unicode string from and to argv, filenames and stdout.
2010-05-19 17:41:05 -07:00
david-sarah
a2cff856ff
Resolve merge conflict for sftpd.py
2010-06-03 11:25:37 -07:00
david-sarah
2dcb62de90
SFTP: possible fix for metadata times being shown as the epoch.
2010-06-02 16:45:14 -07:00
david-sarah
c9984c40e9
SFTP: further improvements to test coverage.
2010-06-02 16:44:22 -07:00
david-sarah
2a791b0d05
SFTP: improve test coverage. Also make creating a directory fail when permissions are read-only (rather than ignoring the permissions).
2010-06-01 21:19:34 -07:00
david-sarah
29a06457d2
dirnode.py: fix a bug in the no-write change for Adder, and improve test coverage. Add a 'metadata' argument to create_subdirectory, with documentation. Also update some comments in test_dirnode.py made stale by the ctime/mtime change.
2010-06-01 20:26:41 -07:00
david-sarah
db394671e9
SFTP: fix a bug that caused the temporary files underlying EncryptedTemporaryFiles not to be closed.
2010-05-31 22:53:10 -07:00
david-sarah
de95140b7b
SFTP: changes for #1063 ('no-write' field) including comment:1 (clearing owner write permission diminishes to a read cap). Includes documentation changes, but not tests for the new behaviour.
2010-05-31 22:11:39 -07:00
david-sarah
9faa02deb5
SFTP: the same bug as in _sync_heisenfiles also occurred in two other places.
2010-05-29 23:01:27 -07:00
david-sarah
cccdd32806
SFTP: another try at fixing the _sync_heisenfiles bug.
2010-05-29 22:52:54 -07:00
david-sarah
51b0d8bde3
SFTP: fix silly bug in _sync_heisenfiles ('f is not ignore' vs 'not (f is ignore)').
2010-05-29 22:38:07 -07:00
david-sarah
b9d3cf12b8
SFTP: log when a sync completes.
2010-05-29 22:18:40 -07:00
david-sarah
c4a8af4d27
SFTP: fix bug in previous logging patch.
2010-05-29 22:00:00 -07:00