kevan
325793457d
Add tests for CachingDict, _pack_contents, _unpack_contents
2009-07-03 20:43:28 -07:00
Brian Warner
ef1b6ae8e3
Tolerate unknown URI types in directory structures. Part of #683 .
...
The idea is that future versions of Tahoe will add new URI types that this
version won't recognize, but might store them in directories that we *can*
read. We should handle these "objects from the future" as best we can.
Previous releases of Tahoe would just explode. With this change, we'll
continue to be able to work with everything else in the directory.
The code change is to wrap anything we don't recognize as an UnknownNode
instance (as opposed to a FileNode or DirectoryNode). Then webapi knows how
to render these (mostly by leaving fields blank), deep-check knows to skip
over them, deep-stats counts them in "count-unknown". You can rename and
delete these things, but you can't add new ones (because we wouldn't know how
to generate a readcap to put into the dirnode's rocap slot, and because this
lets us catch typos better).
2009-07-02 18:07:49 -07:00
Brian Warner
6237aeabd7
create_node_from_uri: take both writecap+readcap, move logic out of dirnode.py
2009-07-02 15:25:37 -07:00
Zooko O'Whielacronx
69a3b23b34
test: multiple by 10 or so all timeouts that Zandr's ARM box just overran
2009-06-10 05:56:39 -07:00
Zooko O'Whielacronx
63c8f0c424
tests: bump up the timeout on a bunch of tests that took longer than the default timeout (120s) on François Lenny-armv5tel
2009-06-04 20:14:44 -07:00
Zooko O'Whielacronx
6350634ee3
tests: remove obsolete test (it tests functionality that is long gone) which occasionally ERRORs now that we have more metadata (since [20090411225205-92b7f-7adfb89cb4db4ac7d28427934dea3d2c108f6476])
2009-04-12 19:36:21 -07:00
Zooko O'Whielacronx
6b9899ade1
trivial: remove trailing whitespace and unused import
2009-04-11 19:17:42 -07:00
Zooko O'Whielacronx
9729753692
dirnode: add 'tahoe'/'linkcrtime' and 'tahoe'/'linkmotime' to take the place of what 'mtime'/'ctime' originally did, and make the 'tahoe' subdict be unwritable through the set_children API
...
Also add extensive documentation in docs/frontends/webapi.txt about the behaviors of these values. See ticket #628 .
2009-04-11 15:52:05 -07:00
Brian Warner
bce4a5385b
add --add-lease to 'tahoe check', 'tahoe deep-check', and webapi.
2009-02-17 19:32:43 -07:00
Brian Warner
e9427ea777
test_dirnode.py: convert Deleter to new no-network gridtest
2009-02-16 17:23:48 -07:00
Brian Warner
60b06b8d32
test_dirnode: #625 run deep-check on a readonly dirnode too
2009-02-13 14:53:37 -07:00
Brian Warner
72adeccf2d
dirnode: add get_repair_cap()
2009-01-22 21:44:49 -07:00
Zooko O'Whielacronx
ef60e85ec6
naming: finish renaming "CheckerResults" to "CheckResults"
2009-01-09 18:00:52 -07:00
Zooko O'Whielacronx
5e6f90a015
rename "checker results" to "check results", because it is more parallel to "check-and-repair results"
2009-01-06 13:37:03 -07:00
Zooko O'Whielacronx
f1fbd4feae
dirnode: don't check MAC on entries in dirnodes
...
In an ancient version of directories, we needed a MAC on each entry. In modern times, the entire dirnode comes with a digital signature, so the MAC on each entry is redundant.
With this patch, we no longer check those MACs when reading directories, but we still produce them so that older readers will accept directories that we write.
2008-12-21 17:35:18 -07:00
Zooko O'Whielacronx
471e1f1b9b
try to tidy up uri-as-string vs. uri-as-object
...
I get confused about whether a given argument or return value is a uri-as-string or uri-as-object. This patch adds a lot of assertions that it is one or the other, and also changes CheckerResults to take objects not strings.
In the future, I hope that we generally use Python objects except when importing into or exporting from the Python interpreter e.g. over the wire, the UI, or a stored file.
2008-12-19 08:39:24 -07:00
Zooko O'Whielacronx
c456ff8591
rename "get_verifier()" to "get_verify_cap()"
2008-12-08 12:44:11 -07:00
Zooko O'Whielacronx
16b20794dd
mutable: merge renaming with test patches
2008-12-07 08:45:19 -07:00
Brian Warner
ffb5985146
mutable.modify(): after UCWE, publish even if the second invocation of the modifier didn't modify anything. For #551 .
2008-12-05 22:49:23 -07:00
Brian Warner
7a0afb59a4
dirnode.py: dirnode.delete which hits UCWE should not fail with NoSuchChildError. Fixes #550 .
2008-12-05 22:08:37 -07:00
Brian Warner
bc53c24003
dirnode manifest: add verifycaps, both to internal API and to webapi. This will give the manual-GC tools more to work with, so they can estimate how much space will be freed.
2008-11-24 14:40:46 -07:00
Brian Warner
4ada26101b
test_dirnode: add an explainError call
2008-11-19 16:02:12 -07:00
Brian Warner
b84c2c6541
manifest: add storage-index strings to the json results
2008-11-19 16:00:27 -07:00
Brian Warner
815e0673e6
manifest: include stats in results. webapi is unchanged.
2008-11-19 15:03:47 -07:00
Brian Warner
dfa2408157
checker: add is_recoverable() to checker results, make our stub immutable-verifier not throw an exception on unrecoverable files, add tests
2008-11-06 22:35:47 -07:00
Brian Warner
b1db6d9ff2
web: add 'Repair' button to checker results when they indicate unhealthyness. Also add the object's uri to the CheckerResults instance.
2008-10-29 18:09:17 -07:00
Brian Warner
b73c380cdb
move testutil into test/common_util.py, since it doesn't count as 'code under test' for our pyflakes numbers
2008-10-28 21:28:31 -07:00
Brian Warner
fca158e83a
dirnode lookup: use distinct NoSuchChildError instead of the generic KeyError when a child can't be found
2008-10-27 13:15:25 -07:00
Brian Warner
2ee6356c89
test_dirnode.py: oops, missed a Monitor(), unbreak tests
2008-10-22 01:50:54 -07:00
Brian Warner
977c6ac510
more #514 : pass a Monitor to all checker operations, make mutable-checker honor the cancel flag
2008-10-22 01:38:18 -07:00
Brian Warner
ad3d9207a9
Change deep-size/stats/check/manifest to a start+poll model instead of a single long-running synchronous operation. No cancel or handle-expiration yet. #514 .
2008-10-21 17:03:07 -07:00
Brian Warner
3ffaded809
web: change t=manifest to return a list of (path,read/writecap) tuples, instead of a list of verifycaps. Add output=html,text,json.
2008-10-06 21:36:18 -07:00
Brian Warner
09341a969a
dirnode: fix my remarkably-consistent 'metdadata' typo
2008-10-02 18:08:45 -07:00
Brian Warner
d0bdf9a611
dirnode: add get_child_and_metadata_at_path
2008-10-02 17:52:03 -07:00
Brian Warner
27a30b90d7
test_netstring.py: move netstring tests to a separate file
2008-09-26 09:55:26 -07:00
Brian Warner
f6eeb3161f
dirnode: cleanup, make get_verifier() always return a URI instance, not a string
2008-09-10 01:37:55 -07:00
Brian Warner
3408d552cd
checker: overhaul checker results, split check/check_and_repair into separate methods, improve web displays
2008-09-07 12:44:56 -07:00
Brian Warner
c80e352951
IFilesystemNode: add get_storage_index(), it makes tests easier
2008-08-12 16:14:07 -07:00
Brian Warner
d106e411af
checker: add information to results, add some deep-check tests, fix a bug in which unhealthy files were not counted
2008-08-11 21:03:26 -07:00
Brian Warner
69156aeb28
dirnode deep-check: add tests of cycles, fix failures
2008-07-17 14:37:04 -07:00
Brian Warner
9289433ba3
first pass at deep-checker, no webapi yet, probably big problems with it, only minimal tests
2008-07-16 18:20:57 -07:00
Brian Warner
7394607141
move encode/upload/download/checker.py into a new immutable/ directory. No behavior changes expected.
2008-07-16 13:14:39 -07:00
Brian Warner
94e619c1f6
overhaul checker invocation
...
Removed the Checker service, removed checker results storage (both in-memory
and the tiny stub of sqlite-based storage). Added ICheckable, all
check/verify is now done by calling the check() method on filenodes and
dirnodes (immutable files, literal files, mutable files, and directory
instances).
Checker results are returned in a Results instance, with an html() method for
display. Checker results have been temporarily removed from the wui directory
listing until we make some other fixes.
Also fixed client.create_node_from_uri() to create LiteralFileNodes properly,
since they have different checking behavior. Previously we were creating full
FileNodes with LIT uris inside, which were downloadable but not checkable.
2008-07-15 17:23:25 -07:00
Brian Warner
87c1e8e066
dirnode: add overwrite= to most API calls, defaulting to True. When False, this raises ExistingChildError rather than overwriting an existing child
2008-05-16 16:09:47 -07:00
Brian Warner
7323ced8e4
test_dirnode: improve coverage of not-mutable-error a bit
2008-05-08 16:53:35 -07:00
Brian Warner
fabdc28c06
deep-stats: add file-size histogram
2008-05-08 16:19:42 -07:00
Brian Warner
a1ea3d9b37
test_dirnode: the size of the directories varies, tolerate it as low as 500 bytes
2008-05-08 13:42:42 -07:00
Brian Warner
e6ae7a2c60
dirnode: refactor deep-stats a bit
2008-05-08 13:33:07 -07:00
Brian Warner
6c00a70dbc
dirnode: add a deep_stats(), like deep-size but with more information. webish adds t=deeps-size too.
2008-05-08 13:21:14 -07:00
Brian Warner
acdd98432d
hush pyflakes warning about code that got moved in the recent StallMixin refactoring
2008-04-22 17:14:26 -07:00