Commit Graph

6214 Commits

Author SHA1 Message Date
Brian Warner
427193d855 bump 'mock' dependency to >=0.8.0, to get the .call object
The 0.6.0 version that was previously allowed did not provide .call, so
test_cli.py failed during import.
2013-03-15 21:46:32 -07:00
David-Sarah Hopwood
7008ffa55e Require at least Python 2.6. fixes #1658
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 05:13:30 +00:00
David-Sarah Hopwood
3bdd744b8e Make doubly sure that we fail quickly on future Python 3.x versions. refs #1775
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 04:41:53 +00:00
David-Sarah Hopwood
edfb40e57c Ensure that bin/tahoe and setup.py fail quickly on Python 3.3+. fixes #1775
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 04:28:35 +00:00
David-Sarah Hopwood
52a583ce6d Add test for anti-Ubuntu-crash-reporter exception-catching code. fixes #1746
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-15 03:42:00 +00:00
David-Sarah Hopwood
ea9dfb0de1 tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
David-Sarah Hopwood
07c26ff805 Only quote newline characters where necessary. fixes #1484
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
Mike Kazantsev
0f499873b0 test_web.py: fix test_GET_DIRECTORY_html_filenode_encoding for Twisted==12.3.0. fixes #1922
twisted.web.html.escape was used to produce html-encoded string (to then look
it up in "value" attribute), but behavior of that function has changed between
Twisted 12.2.0 (simple custom implementation) and 12.3.0 (imported from stdlib
cgi module).
2013-02-27 23:21:38 +06:00
David-Sarah Hopwood
cdf1752a5d Add comment explaining fix to #1679. refs #1679
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-02-08 19:27:57 +00:00
Zooko O'Whielacronx
45c64edc76 do not cache and re-use imm filenodes in nodemaker
fixes #1679
2013-02-07 16:35:43 +00:00
Zooko O'Whielacronx
8df3a07625 unit test for #1679 2013-02-07 16:35:23 +00:00
David-Sarah Hopwood
a9272522d5 tahoe_check.py: tolerate missing fields in check results for LIT files/dirs. fixes #1758
Also test this case and improve some existing tests of 'tahoe check'.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-01-03 22:16:20 +00:00
David-Sarah Hopwood
456955e4f0 Make WUI headings and titles more consistent and accurate:
'Recent and Active Operations' and 'Operational Statistics'. fixes #1457

Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-29 23:54:54 +00:00
David-Sarah Hopwood
062ae99372 test_web.py: minor cleanup to test_helper_status.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-12-29 23:44:11 +00:00
David-Sarah Hopwood
a5895b9d59 If a helper is not configured, make the banner on the welcome page say that, and have a white background.
fixes #1735

Author: kick
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-29 04:17:00 +00:00
David-Sarah Hopwood
eba64f2aba docs/configuration.rst: clarification on scale suffixes for reserved_space.
refs #1812

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 23:38:58 +00:00
David-Sarah Hopwood
3888915996 Make abbreviate_space able to output in exabytes. refs #1812
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 20:08:27 +00:00
David-Sarah Hopwood
6d2ca45c4a Allow T (terabytes), P (petabytes), and E (exabytes), case-insensitive, in parse_abbreviated_size.
This also simplifies how case-insensitivity is handled, and fixes a corner case
where the wrong exception was raised when the size ends in "BB".
fixes #1812

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 20:08:00 +00:00
David-Sarah Hopwood
5c4ca677e1 Make the system test nodes have non-ASCII nicknames.
This ensures that non-ASCII nicknames are exercised with the real server code.
refs #1298

Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-27 19:00:22 +00:00
David-Sarah Hopwood
0d4a826f0e Allow welcome and storage status pages to display a non-ASCII node nickname. fixes #1298
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-27 05:08:53 +00:00
David-Sarah Hopwood
4563ba456b Remove ResponseCache in favor of MDMFSlotReadProxy's cache. closes #1240.
This contains several merged patches. Individual messages follow, latest first:

* Fix a warning from check-miscaptures.
* In retrieve.py, explicitly test whether a key is in self.servermap.proxies
  rather than catching KeyError.
* Added a new comment to the MDMF version of the test I removed, explaining
  the removal of the SDMF version.
* Removed test_corrupt_all_block_hash_tree_late, since the entire block_hash_tree
  is cached in the servermap for an SDMF file.
* Fixed several tests that require files larger than the servermap cache.
* Remove unused test_response_cache_memory_leak().
* Exercise the cache.
* Test infrastructure for counting cache misses on MDMF files.
* Removed the ResponseCache. Instead, the MDMFSlotReadProxy initialized
  by ServerMap is kept around so Retrieve can access it. The ReadProxy
  has a cache of the first 1000 bytes initially read from each share by
  the ServerMap. We're able to satisfy a number of requests out of this
  cache, so roundtrips are reduced from 84 to 60 in test_deepcheck_mdmf.
  There is still some mystery about under what conditions the cache has
  fewer than 1000 bytes. Also this breaks some existing unit tests that
  depend on the inner behavior of ResponseCache.
* The servermap.proxies (a cache of SlotReadProxies) is now keyed
  by (verinfo,serverid,shnum) rather than just (serverid,shnum)
* Minor cosmetic changes
* Added a test failure if the number of cache misses is too high.

Author: Andrew Miller <amiller@dappervision.com>
Signed-off-by: David-Sarah Hopwood <davidsarah@jacaranda.org>
2012-12-27 00:00:17 +00:00
David-Sarah Hopwood
8618929833 docs/logging.rst: fix rst2html warnings.
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-22 23:47:47 +00:00
David-Sarah Hopwood
a125f83f1a docs/logging.rst: remove note about a bug that was fixed in foolscap 0.6.0.
Signed-off-by: David-Sarah Hopwood <davidsarah@mint>
2012-12-22 23:39:11 +00:00
David-Sarah Hopwood
884685278b test/common_util.py: fix a bug in NonASCIIPathMixin that would cause spurious log entries on Windows.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-12-02 01:54:47 +00:00
Zooko O'Whielacronx
73d5a059bd tests: add more diagnostics when code-under-test fails
This prints out which things are different when two sets are expected to be the
same. This was useful to me when debugging the code under test. Hm, this
pattern might be more generally useful...
2012-11-29 14:11:47 -07:00
Zooko O'Whielacronx
abcde9645c remove unnecessary request from upload-helper
The unnecessary request was from the upload helper to the sender, and it was
there in order to trigger the sender to deliver cleartext hashes. But we've
long since removed cleartext hashes.

Unit tests pass both before and after this change, and code-coverage shows that
the block I changed is exercised in unit tests.
2012-11-29 13:44:32 -07:00
Zooko O'Whielacronx
06a8b1ea84 pkg_resources: better error message on bad spec
Include the text of the offending distribution spec when it is ill-formed.

I got an error message from pkg_resources.py saying that a distribution spec
was ill-formed, because it ended with an '=' and nothing came after the '='.
However, the error message and stack trace didn't tell which distribution spec
it was.

With this patch, it includes the distribution spec itself in the error message.

There is no unit test of this patch, but I did test it manually by inserting a
"raise ValueError('WHATEVER')" into the code and re-running it and observing
that the new output correctly included the distribution
2012-11-22 17:09:41 +00:00
David-Sarah Hopwood
d5c8580d8e NEWS.rst: add a missing dependency update for 1.9.2.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-20 05:59:00 +00:00
David-Sarah Hopwood
57017cebe8 Makefile: increase filesystem size for 'make tmpfstest'.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-16 20:30:19 +00:00
David-Sarah Hopwood
e097cf96b2 web/unlinked.py: don't use % operator to expand %(uri)s. fixes #1860.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-15 04:16:19 +00:00
David-Sarah Hopwood
4c91fa948d docs/frontends/CLI.rst: fix markup of * and ?.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-11 16:04:23 +00:00
David-Sarah Hopwood
86471233f0 docs/frontends/CLI.rst: document ./* trick, and that aliases should not be a single char on Windows.
Also fix some rst2html warnings. refs #1853, #1840

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-11 15:50:46 +00:00
David-Sarah Hopwood
522e74f572 Update docs/network-and-reliance-topology.svg for RAIC, and to be more accurate about frontend protocols.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-03 00:15:32 +00:00
David-Sarah Hopwood
1ffed22651 CLI: fix synopsis for 'tahoe ls'. fixes #1839
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-01 23:40:06 +00:00
David-Sarah Hopwood
a77ae772f2 docs/about.rst: fix broken link for network-and-reliance-topology image.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-11-01 23:09:07 +00:00
David-Sarah Hopwood
edc1f5f67f Makefile: add 'make tmpfstest', which uses a tmpfs for _trial_temp.
This probably only works on Linux. It uses sudo to mount and unmount the tmpfs,
which may prompt for a password. refs #20

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 02:16:21 +01:00
David-Sarah Hopwood
b3bf20748f test_runner: we no longer need to skip tests on Twisted < 9.0.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 01:17:12 +01:00
David-Sarah Hopwood
1df7f114b7 src/allmydata/web/directory.py: fix HTML double-encoding issue for filenames.
Nevow automatically HTML-escapes strings passed in stan without a raw marker.
Written by MK_FG. fixes #1143

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-10-25 01:01:25 +01:00
Mike Kazantsev
05d0b8b5b9 docs/frontends/webapi.rst: remove (ignored) "size" keyword from mkdir POST example 2012-10-09 15:01:44 -07:00
Zooko O'Whielacronx
52571f469e add alternating grey-background to make it easier to scan across the table left to right 2012-10-08 12:08:50 -07:00
Zooko O'Whielacronx
63b24152a7 link from the tahoe-lafs-dep-eggs/README.html to the relevant wiki pages 2012-10-08 10:49:42 -07:00
frederik b
595d611c9b fixed wrong index in tahoe cp --verbose, as explained in #1805
this bug shows wrong counters for copied files in verbose mode
2012-09-29 21:32:51 -07:00
David-Sarah Hopwood
bdd0b55b0d Ignore *~, /miscaptures.txt and /violations.txt.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2012-09-17 14:06:48 -07:00
david-sarah
36c176224d src/allmydata/__init__.py: ensure that if a dependency cannot be imported, we will report that rather than reporting a confusing message about the version and location being None. fixes #1804 2012-09-14 02:14:48 +00:00
david-sarah
6c654be4d5 docs/quickstart.rst: swap two paragraphs to make it more likely a user will report import and versioning errors from 'bin/tahoe --version' if there are any, before trying to run tests. Also, change 'python setup.py test' to 'python setup.py trial' to avoid a rebuild that might change the dependencies (if setuptools decides to throw a spanner in the works). 2012-09-14 02:10:12 +00:00
Brian Warner
15c95c2e12 Apply David-Sarah's recommended changes. Closes #974 2012-09-04 15:45:38 -07:00
Andrew Miller
4f19f2b4b4 When the CLI cannot connect to the gateway, it prints an error message rather than raising a python exception. Includes a unit test
Signed-off-by: Andrew Miller <amiller@dappervision.com>
2012-09-04 14:48:50 -07:00
david-sarah
ca620a6ce1 Cosmetic changes to match cloud backend branch. 2012-07-24 03:40:49 +00:00
david-sarah
5105448421 interfaces.py: corrections to take into account that lease cancel secrets are no longer honoured. 2012-07-24 03:40:06 +00:00
david-sarah
e8240b0923 interfaces.py: corrections to interfaces to make more of them checkable. 2012-07-24 03:39:24 +00:00