Commit Graph

3622 Commits

Author SHA1 Message Date
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
Daira Hopwood
ca3c7abe3a Only get the local addresses if they are actually used. refs #754
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-10 17:12:43 +00:00
Daira Hopwood
c9a56eae2b Allow combining autodetected and statically configured locations. fixes #754
Replaces the location 'AUTO' with the autodetected IP/port combination.

Author: Chris Kerr <debdepba@dasganma.tk>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-09 19:18:58 +00:00
Daira Hopwood
9ac392802b Test the quotemarks=True and quotemarks=False options of quote_local_unicode_path.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-05 02:22:27 +00:00
Daira Hopwood
d53c7ee905 Test the quotemarks=False option of encodingutil.quote_path.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-05 02:13:23 +00:00
Daira Hopwood
fc90607eec Further refine error handling in windows_getenv to correctly handle zero-length environment values. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-04 17:02:02 +00:00
Brian Warner
30987c1e7d remove stray trailing whitespace 2015-02-04 01:35:44 -08:00
Brian Warner
597542dc77 test that web.static= is really treated as a relative path
Also ssh.authorized_keys_file .
2015-02-03 22:23:31 -08:00
Daira Hopwood
86726729b7 Quote the default node-directory correctly in help output. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-04 00:10:21 +00:00
Daira Hopwood
d756ef1765 More robust error handling in windows_getenv. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-02-03 23:47:53 +00:00
Brian Warner
7426eccb29 tahoe_cp.py: clean up unicode handling 2015-02-03 11:10:36 -08:00
Daira Hopwood
8147f3c77e Changes filename to unicode before placing the file. refs #2027
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:25 +00:00
Daira Hopwood
b6a645aeb3 Adds test_ticket_2027 to test_cli.Cp. refs #2027
Author: Mark Berger <mark.berger.j@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:25 +00:00
Daira Hopwood
c1d5c4f07a Fix user-path-expansion on Windows for non-ASCII home directories. refs #1674
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:24 +00:00
Daira Hopwood
14f783086f Change uses of os.path.expanduser and os.path.abspath. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:50:18 +00:00
Daira Hopwood
4a0cdce86b Use absolute paths in tahoe cp and tahoe backup. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:47:35 +00:00
Daira Hopwood
21b477f235 Add support in abspath_expanduser_unicode for expanding relative to a base path. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:47:09 +00:00
Daira Hopwood
95f98e1aae Quote local paths correctly. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:05:20 +00:00
Daira Hopwood
c20a3525b7 Use "long" paths prefixed with \\?\ on Windows. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:05:14 +00:00
Daira Hopwood
9a401b760e fileutil cleanup: delete the unused open_or_create function.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-29 18:19:57 +00:00
Mark Berger
db12f1cffb Adds _servers_with_shares to ServermapUpdater
When calculating the query boundary for updates to mutable files,
instead of using servers that used to have shares, use servers we
have added to the servermap. This way the querying process won't finish
until we have finished interacting with the servers that have shares.

This fixes the race condition which sometimes caused the querying process
to finish before the updater was done talking to servers with shares.
2015-01-27 00:40:14 -08:00
Brian Warner
38a4acd623 Appease req.setHeader by passing bytes, not ints.
twisted.web.http.Request.setHeader() really wants a "bytes" object, but
we've been passing integers like len(body). Twisted-12.3 started to
complain about this (with a DeprecationWarning), but the warning is
usually silenced because py2.7 disables deprecations by default.

This fixes Tahoe's misbehavior, but others remain (in Nevow, at least).
I plan to set up some tooling to run tests with
PYTHONWARNINGS=default::DeprecationWarning and collect others. We won't
be able to fix the ones that occur outside of Tahoe, but at least we
should be able to fix our own.

refs ticket:2312
2015-01-21 10:31:31 -08:00
Brian Warner
3ad18648dd welcome.xhtml: improve layout by floating the icons to the left.
This uses less vertical space.
2015-01-20 17:24:27 -08:00
Nathan Wilcox
e499d84755 Introduce icons with distinct shape for connection status display on the front wui page...
This replaces the status display which was only distinct by color which is a usability issue for color-blind users.  This commit includes test coverage by way of pattern matching on rendered templates.  The PNG icons are conversions of original SVG source which I've included and placed in the public domain.
2015-01-20 16:41:01 -08:00
Daira Hopwood
e73d76eb1b Latest cryptography depends on enum34.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-20 10:52:07 -08:00
Daira Hopwood
ef455df990 dependecy specs: tolerate new PEP440 semantics too
The latest setuptools (version 8) changed the way dependency
specifications ("I can handle libfoo version 2 or 3, but not 4") are
interpreted. The new version follows PEP440, which is simpler but
somewhat less expressive. Tahoe's _auto_deps.py now uses dep-specs which
are correctly parsed by both old and new setuptools.

Fixes ticket:2354.

* Restrict the requirements in _auto_deps.py to work with either the old
  or PEP 440 semantics.
* Update check_requirement and tests to take account of changes for PEP
  440 compatibility.
* Fix an error message.
* Remove a superfluous TODO.
2015-01-20 10:52:02 -08:00
Daira Hopwood
0e9f0da51f Reserve all keytypes starting with "ssh-" in an accounts file, rather than only "ssh-rsa" and "ssh-dsa".
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-06 19:09:04 +00:00
Daira Hopwood
6c756ba3e9 Simplify key checking code by inlining _allowedKey and _correctSignature. refs #1141
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-06 18:10:41 +00:00
Jean-Paul Calderone
102d581a90 Give out FTPAvatarID objects instead. 2015-01-04 09:48:38 -05:00
Jean-Paul Calderone
38aee94a3e Add the rest of the failure-case tests and a success-case test. Update the implementation to make them pass. 2015-01-04 09:44:56 -05:00
Jean-Paul Calderone
79a6be565b Add a test for the bad key case of unauthorized ssh key checking. 2015-01-04 08:02:49 -05:00
Jean-Paul Calderone
f3cb2d42d7 Add a test for one unauthorized case of ssh key checking. 2015-01-04 08:02:23 -05:00
Matt Hazinski
4a18f03960 Move UDP listen inside try block 2014-12-29 20:21:24 -05:00
Daira Hopwood
e4149496d2 Fix minor dependencies on "allmydata-tahoe" as appname.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-12-05 23:29:07 +00:00
Daira Hopwood
c0a2af5d69 test_storage_client.py: add test_get_available_space_{old,new}.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-11-23 06:03:00 +00:00
Leif Ryge
b9e0d19944 add available-space to VERSION_DEFAULTS
as per warner's suggestion in https://github.com/warner/tahoe-lafs/pull/4
2014-11-23 06:03:00 +00:00
Leif Ryge
336688165e tests for "Available" column (#648)
thanks to the anonymous author who posted this on trac
2014-11-23 06:03:00 +00:00
Leif Ryge
335c2ed06a add "Available" column to welcome page (#648)
add get_available_space() to NativeStorageServer

It uses a new 'available-space' key in the server's v1 version dict, or falls
back to 'maximum-immutable-share-size' (which presently always has the same
value but could have a different meaning in the future).

This is a squash merge of 9773555bb87fab71145ad7a0e84785a4e92d11f7
2014-11-23 06:03:00 +00:00
Leif Ryge
bca538ac64 rm NativeStorageServer's unused min_shares argument 2014-11-22 04:08:45 +00:00
Daira Hopwood
fc886a7d02 Improve error reporting and help for start/stop/etc. commands.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-21 19:15:32 +01:00
Daira Hopwood
13ae872ace startstop_node.py: rename internal command and twistd plugin class used to start tahoe nodes.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-21 19:04:14 +01:00
Brian Warner
87a6894e62 'tahoe start': stop using the contents of .tac files
Instead of constructing a sys.argv for 'twistd' that reads the node's
.tac file, we construct arguments that tell twistd to use a special
in-memory-only plugin that creates the desired node instance directly.

We still use the name of the .tac file to decide which kind of instance
to make (Client, IntroducerNode, KeyGenerator, StatsGatherer), but never
actually read the contents of the .tac file. Later improvements could
change this to look inside the tahoe.cfg for a nodetype= directive, etc.

This also makes it easy to have "tahoe start BASEDIR" pass the rest of
its arguments on to twistd, so e.g. "tahoe start BASEDIR --nodaemon
--profile=prof.out" does what you'd expect "twistd --nodaemon
--profile=prof.out" to do. "tahoe run BASEDIR" is thus simply aliased to
"tahoe start BASEDIR --nodaemon". This removes the need to special-case
--profile and --syslog.

I also removed some of the default logging behavior:

 before:
  'tahoe start' = 'twistd --logfile BASEDIR logs/twistd.log'
  'tahoe start --profile' adds '--profile=profiling_results.prof --savestats'
  'tahoe run' = 'twistd --nodaemon --logfile BASEDIR/logs/tahoesvc.log'

 after:
  'tahoe start' = 'twistd --logfile BASEDIR logs/twistd.log'
     unless --logfile, --nodaemon, or --syslog are passed
  'tahoe start --profile' invalid, use 'tahoe start --profile=OUTPUT'
  'tahoe run' = 'twistd --nodaemon'
     so log messages go to stdout

This finally enables 'tahoe run' to work with all node types, including
the key-generator and stats-gatherer.

It gets 'tahoe start' one step closer to accepting --reactor= . To
actually accomplish this will require this file, the enclosing
__init_.py files, and everything they import to avoid importing the
reactor. (if anything imports twisted.internet.reactor before
startstop_node.start() gets to run, then --reactor= comes too late).
That will take a lot of work, and requires lazy-loading of many core
libraries (foolscap.logging in particular), and removing a lot of code
from src/allmydata/__init__.py .
2014-10-21 19:02:25 +01:00
Daira Hopwood
323cff5b56 Remove an unused import.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-10 20:39:18 +01:00
Daira Hopwood
346b5c4c3d Don't call filenode.get_size() twice. refs #1634
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-10 20:36:08 +01:00
zooko
200492760a Merge pull request #120 from zancas/1634-dont-return-none_5
1634 dont return none 5
2014-10-10 19:16:12 +00:00
zancas
425b9049ea Do not report 'size' metadata if get_size returns None 2014-10-10 11:27:28 -06:00
zancas
1545e14076 exercise all branches of new helper "get_filenode_metadata"
Note fix following issues from origial commit:

refactor unittests, fix style, add test

(0) use CommonFixture as mixin to increase DRYness
(1) self.failUnlessIn('size', metadata.keys()) --> self.failUnlessIn('size', metdata)
(2) test_size_is_not_None --> test_size_is_0 AND test_size_is_1000
2014-10-10 11:27:27 -06:00
zancas
0baa744411 refactor get_filenode_metadata(...) into common.py 2014-10-10 11:19:25 -06:00
Daira Hopwood
5bd76005a6 Correct a comment about which version of Twisted introduces a pywin32 dependency (12.3.0, not 13.0).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-08 12:57:31 +01:00
Daira Hopwood
b0b76a7c5b Improve comments in _auto_deps.py. refs #2249, #2028, #2193, #2005, #1258
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 21:04:40 +01:00
Daira Hopwood
680559d58e _auto_deps.py cosmetics and cleanup.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:23 +01:00
Daira Hopwood
18ffc29f49 Only allow pyOpenSSL >= 0.14 if it is already installed. fixes #2193
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:13 +01:00
Daira Hopwood
ec188d254c Make dependencies different for Windows and non-Windows. fixes #2249
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:11:00 +01:00
Daira Hopwood
b2e897c2a9 Move require_more() to top-level.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-07 19:06:14 +01:00
Daira Hopwood
ea09305987 Refactoring to move the not_import_versionable and ignorable package lists to _auto_deps.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-02 16:42:44 +01:00
Loose Cannon
7bfa9c64fb 1901 - Fix Welcome Page
Solution was very simple to implement, no content disposition header was
necessary.
Tested with both Firefox and Chrome, using binary image file stored in
folder, as well as with text data using LIT cap.
2014-09-26 17:02:14 -04:00
Brian Warner
d27a57cb49 Avoid Popen() of executables that don't exist
The stdlib 'subprocess' module in python-2.7.4 through 2.7.7 suffers
from http://bugs.python.org/issue18851 which causes unrelated file
descriptors to be closed when `subprocess.call()` fails the `exec()`,
such as when the executable being invoked does not actually exist. There
appears to be some randomness involved. This was fixed in python-2.7.8.

Tahoe's iputil.py uses subprocess.call on many different "ifconfig"-type
executables, most of which don't exist on any given platform (added in
git commit 8e31d66cd0). This results in a lot of file-descriptor
closing, which (at least during unit tests) tends to clobber important
things like Tub TCP sockets. This seems to be the root cause behind
ticket:2121, in which normal code tries to close already-closed sockets,
crashing the unit tests. Since different platforms have different
ifconfigs, some platforms will experience more failed execs than others,
so this bug could easily behave differently on linux vs freebsd, as well
as working normally on python-2.7.8 or 2.7.4.

This patch inserts a guard to make sure that os.path.isfile() is true
before allowing Popen.call() to try executing the target. This ought to
be enough to avoid the bug. It changes both iputil.py and
allmydata.__init__ (which uses Popen for calling "lsb_release"), which
are all the places where 'subprocess' is used outside of unit tests.

Other potential fixes: use the 'subprocess32' module from PyPI (which is
a bug-free backport of the Python3 stdlib subprocess module, but would
introduce a new dependency), or require python >= 2.7.8 (but this would
rule out development/deployment on the current OS-X 10.9 release, which
ships with 2.7.5, as well as other distributions like Ubuntu 14.04 LTS).

I believe this closes ticket:2121, and given the apparent relationship
between 2121 and 2023, I think it also closes ticket:2023 (although
since 2023 doesn't have copies of the failing log files, it's hard to
tell). I'm hoping that this will tide us over until 1.11 is released, at
which point we can execute on the plan to remove iputil.py entirely by
changing the way that nodes learn their externally-facing IP address.
2014-09-12 13:01:56 -07:00
Brian Warner
38668c9e35 test_disk_stats: tolerate used==0 for a Travis worker bug
Some Travis-CI workers report persistently empty disks, causing spurious
test failures. It's not really that important to assert used>0, so this
relaxes the test.

Closes ticket:2290
2014-09-12 12:55:52 -07:00
Brian Warner
528364a421 welcome.xhtml: explain MDMF too 2014-09-11 21:32:27 -07:00
Scott Arciszewski
62a4b2721c Update welcome.xhtml
Add a tooltip to explain what SDMF means. Cannot find a definition for MDMF; I presume "Medium" but at the risk of being wrong, I don't want to just blindly make that suggested change.
2014-09-11 21:29:13 -07:00
Brian Warner
6ffcb50173 Remove 'trialcoverage' plugin and support code
Closes ticket:2281 (trac).

This removes src/allmydata/test/trial_coverage.py, which was a
in-process way to run trial tests under the "coverage" code-coverage
tool. These days, the preferred way to do this is with "coverage run",
although the actual invocation is a bit messy because of the way
bin/trial uses subprocess.call() to invoke the real entrypoint script
with the right PYTHONPATH (see #1698 for details). Hopefully this will
be improved to use a simpler "coverage run .." command in the future.

This patch also removes twisted/plugins/allmydata_trial.py, which
enabled the "--reporter=bwverbose-coverage" option. Finally it modifies
setup.py to stop looking for that option and adding "trialcoverage" to
the dependencies list, which gets us closer to removing "setup_requires"
entirely.
2014-09-08 17:28:26 -07:00
Mark Berger
954229231d Removes unnecessary import 2014-09-02 18:48:39 -07:00
Mark Berger
e594f2b1ab Fixes tests which were improperly deleting shares 2014-09-02 18:48:39 -07:00
Mark Berger
2ab6172302 Adds delete_all_shares 2014-09-02 18:48:39 -07:00
Mark Berger
1467eb53b9 Deletes shares from server 0 correctly
Deletes the shares from server 0 without setting the remaining
size to 0
2014-09-02 18:48:39 -07:00
Brian Warner
58b66b4018 check_memory: stop using long-deprecated twisted internals 2014-09-02 18:22:59 -07:00
Leif Ryge
d7aef0cffb add a <br> 2014-09-02 13:55:13 -07:00
Mark J. Berger
52859423ba Updates webui directory forms 2014-09-02 13:55:13 -07:00
Leif Ryge
61395328c3 make tests pass with redesigned directory pages 2014-09-02 13:55:13 -07:00
Tony Arcieri
c1f3008d03 Redesigned directory pages (WIP)
This is an initial conversion of the directory pages from the old style
to the new style which is based on Twitter Bootstrap.

Still some remaining work to be done. You can see a screenshot here:

http://i.imgur.com/MPEngGx.png
2014-09-02 13:55:12 -07:00
Brian Warner
7015f21e5a welcome page: improve CSS slightly for narrow windows
Thanks to tarcieri for the patch.

refs ticket:1931
2014-09-02 13:44:53 -07:00
Brian Warner
45adde7180 publish.py: log roothash in base32, not binary
Closes ticket:1800
2014-09-02 13:32:59 -07:00
Mark Berger
47c8616dd5 Fix tests which relied on the old behavior of tahoe cp -r 2014-09-02 12:51:13 -07:00
Mark Berger
1c96039270 tahoe cp -r now copies the top level directory with its children 2014-09-02 12:51:13 -07:00
Mark Berger
2d8ffdc0ee Adds test_cli.Cp.test_cp_copies_dir 2014-09-02 12:51:13 -07:00
Daira Hopwood
e613111c45 Suppress a DeprecationWarning from Twisted.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-01 21:12:53 +01:00
travis-tahoe
036c325d35 Suppress all UserWarnings, not just ones with known messages. refs #2248
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-01 19:39:57 +01:00
travis-tahoe
cc223d08fa Suppress warning about service_identity. fixes #2248
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-01 19:10:32 +01:00
travis-tahoe
7ecc27e2d9 Revert previous patch; service_identity has too many subdependencies.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-01 19:04:10 +01:00
travis-tahoe
f7b8fe02ba Add service_identity as a dependency. fixes #2248
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-01 18:46:58 +01:00
Daira Hopwood
91077f084d test_runner: rename *_FILE variables to lowercase, because they are not constants.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-08-17 15:51:19 +01:00
Daira Hopwood
647ebce6b9 Better name for the file that causes a node to exit after a timeout when running unit tests. refs #1336
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-08-17 15:51:19 +01:00
Zooko Wilcox-O'Hearn
617f667769 remove obsolete comment 2014-08-05 16:36:59 +00:00
Brian Warner
99479226ed hush current pyflakes warnings (list comprehensions)
closes #2245
2014-06-23 13:54:07 -07:00
Daira Hopwood
488cfb939f Fix a pyflakes warning.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 23:17:51 +01:00
Daira Hopwood
efc223ad1f Improve error reporting for '#' characters in config entries. refs #2128
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 23:14:48 +01:00
Daira Hopwood
87df9d218d Fix a shallow bug.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 23:05:06 +01:00
Daira Hopwood
883dd9795b Error if a .furl config entry contains an unescaped '#'. fixes #2128
Author: Andrew Miller <amiller@dappervision.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 22:55:50 +01:00
Daira Hopwood
c85060c436 Revert [603f5eba32] which was applied unintentionally.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 22:09:33 +01:00
Daira Hopwood
20b26f773b Fix #2048 (test_copy_using_filecap was doing much more work than necessary).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 15:29:29 +01:00
Daira Hopwood
a707639380 Fix comments in test_copy_using_filecap to reflect what the tests actually do.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-05 15:29:29 +01:00
Daira Hopwood
603f5eba32 Use "long" paths prefixed with \\?\ on Windows. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-05-04 17:05:48 +01:00
Brian Warner
b6c0297dee Include unminified versions of d3+jquery. Addresses #2208.
This should hopefully satisfy the Debian requirement to include original
sources. The old minified files for d3 and jquery were 63k and 91k
respectively, while the new unminified files are 133k and 293k.
2014-04-25 16:16:05 -07:00
Daira Hopwood
4889129f37 Minor comment fix. refs #1847
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-04-21 22:41:23 +01:00
Daira Hopwood
77767e9e12 Remove ugly shadowing of Client.DEFAULT_ENCODING_PARAMETERS. fixes #1847
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-04-21 22:41:23 +01:00
Daira Hopwood
7db853a777 setup.py: include data files in package_data= with paths relative to src/allmydata/web.
Remove packages= entries and unneeded __init__.py files for those subdirectories.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-03-29 00:41:33 +00:00
Daira Hopwood
0ef5939477 Remove 'needs-rebalancing' and add 'count-happiness' to checker reports; repair tests. fixes #1784, #2105
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-03-20 16:13:57 +00:00
Daira Hopwood
6ca5f5fc39 Use bigger random one-time keys in timing_safe_compare. fixes #2165
Follows this advice from Marsh Ray and Solar Designer: https://twitter.com/zooko/status/431105294777597952

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-02-24 20:43:23 +00:00
Daira Hopwood
d5651a0d0e Rename 'constant_time_compare' to 'timing_safe_compare'. refs #2165
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-02-24 20:43:23 +00:00
Leif Ryge
db43528430 isolate test_keygen data
This makes test_keygen use its own basedir, to avoid polluting the _trial_temp
directory for later tests.
2014-01-12 21:25:11 +00:00
David
34517f5f68 Right aligning services div 2013-12-26 23:26:56 +01:00
Daira Hopwood
aa29f2655d tahoe debug trial: print a warning message if testing uncommitted code. fixes #1992
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-08-31 18:01:34 +01:00
zooko
e493dcec4a Merge pull request #48 from markberger/740-cli-accept-multiple-aliases
740 cli accept multiple aliases
2013-08-27 08:16:12 -07:00
Mark Berger
71504699a2 Added test_check_with_multiple_aliases in test_cli 2013-07-26 13:01:51 -04:00
Mark Berger
bf235849c9 Allows check and deep-check to take multiple arguments (ticket #740) 2013-07-26 13:01:50 -04:00
Daira Hopwood
7702999107 Fix a pyflakes import warning.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-07-18 20:54:19 +01:00
Daira Hopwood
2bbfc7927d src/allmydata/uri.py: Remove unused 'human encoding' methods, and associated tests. fixes #1807
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-07-18 20:51:06 +01:00
Daira Hopwood
b088380736 test_iputil.py: fix and improve tests on Windows.
Test all platform variants (Unix, Windows, Cygwin) on each platform.

Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-26 16:44:05 +01:00
Daira Hopwood
f97b8e5e1d test_iputil.py: repair a test for cygwin (which is intended to behave differently).
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 23:32:02 +01:00
Daira Hopwood
08590b1f6a iputil.py: simplify address finding code on cygwin.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 19:51:27 +01:00
Daira Hopwood
16b245563d test_iputil.py: use more realistic error for 'command not found' in mock.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 19:50:52 +01:00
Daira Hopwood
b31a4f6e87 test_iputil.py: repair a test by mocking 'get_local_ip_for'.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 19:50:00 +01:00
Daira Hopwood
a493ee0bb6 iputil.py: add tests for recent changes. refs #1381, #1988, #982, #1064, #1536, #1935, #898, #1707, #1918
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 19:15:05 +01:00
Daira Hopwood
6104950ed8 iputil.py: fix an error handling bug. refs #1381
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-06-25 19:13:48 +01:00
Daira Hopwood
f77ec470d7 iputil.py: minor cleanup to avoid dropping a Deferred.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-28 19:52:47 +01:00
Daira Hopwood
8e31d66cd0 iputil.py: refactor address-finding code to treat all Unices the same.
refs #1988, #982, #1064, #1536, #1935
fixes #898, #1707, #1918

Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-28 19:52:19 +01:00
Daira Hopwood
6a445d73bc iputil.py: retry address queries on EINTR. fixes #1381
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-28 19:44:02 +01:00
Daira Hopwood
ec191bfca6 WUI: add time page was rendered to client and introducer welcome pages. closes #1972
Author: Leif Ryge <leif@synthesize.us>
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-19 23:27:23 +01:00
Leif Ryge
30924a506c properly describe saving incident reports. closes #1974 2013-05-19 07:31:43 +00:00
Daira Hopwood
705c47f9e9 Improvements to test refs #1742
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-15 14:14:12 +01:00
Daira Hopwood
e821c9e23d Add a test for raising NotEnoughSharesError when a Retrieve object is created with an insufficient servermap. refs #1742
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-15 04:25:42 +01:00
Daira Hopwood
7956e22d21 Include the number of remaining shares of the right version in NotEnoughSharesError messages.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-14 23:20:47 +01:00
Daira Hopwood
e76281744c mutable/retrieve.py: improve comments. refs #1742
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-14 23:20:46 +01:00
Daira Hopwood
cf52c512c5 Raise NotEnoughSharesError if there are initially not enough shares for a mutable retrieve. refs #1742
We also change the order of setting up attributes in Retrieve so that _raise_notenoughshareserror() can be called from _setup_download.

Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-14 23:20:46 +01:00
Daira Hopwood
a74b09ec86 mutable/retrieve.py: inline the single-use function _remove_reader.
A simple refactoring. Doesn't even require a new or updated unit test.

Author: Zooko O'Whielacronx <zooko@zooko.com>
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-05-14 23:20:46 +01:00