tahoe-lafs/src/allmydata/test
Brian Warner 0d5dc51617 Overhaul IFilesystemNode handling, to simplify tests and use POLA internally.
* stop using IURI as an adapter
* pass cap strings around instead of URI instances
* move filenode/dirnode creation duties from Client to new NodeMaker class
* move other Client duties to KeyGenerator, SecretHolder, History classes
* stop passing Client reference to dirnode/filenode constructors
  - pass less-powerful references instead, like StorageBroker or Uploader
* always create DirectoryNodes by wrapping a filenode (mutable for now)
* remove some specialized mock classes from unit tests

Detailed list of changes (done one at a time, then merged together)

always pass a string to create_node_from_uri(), not an IURI instance
always pass a string to IFilesystemNode constructors, not an IURI instance
stop using IURI() as an adapter, switch on cap prefix in create_node_from_uri()
client.py: move SecretHolder code out to a separate class
test_web.py: hush pyflakes
client.py: move NodeMaker functionality out into a separate object
LiteralFileNode: stop storing a Client reference
immutable Checker: remove Client reference, it only needs a SecretHolder
immutable Upload: remove Client reference, leave SecretHolder and StorageBroker
immutable Repairer: replace Client reference with StorageBroker and SecretHolder
immutable FileNode: remove Client reference
mutable.Publish: stop passing Client
mutable.ServermapUpdater: get StorageBroker in constructor, not by peeking into Client reference
MutableChecker: reference StorageBroker and History directly, not through Client
mutable.FileNode: removed unused indirection to checker classes
mutable.FileNode: remove Client reference
client.py: move RSA key generation into a separate class, so it can be passed to the nodemaker
move create_mutable_file() into NodeMaker
test_dirnode.py: stop using FakeClient mockups, use NoNetworkGrid instead. This simplifies the code, but takes longer to run (17s instead of 6s). This should come down later when other cleanups make it possible to use simpler (non-RSA) fake mutable files for dirnode tests.
test_mutable.py: clean up basedir names
client.py: move create_empty_dirnode() into NodeMaker
dirnode.py: get rid of DirectoryNode.create
remove DirectoryNode.init_from_uri, refactor NodeMaker for customization, simplify test_web's mock Client to match
stop passing Client to DirectoryNode, make DirectoryNode.create_with_mutablefile the normal DirectoryNode constructor, start removing client from NodeMaker
remove Client from NodeMaker
move helper status into History, pass History to web.Status instead of Client
test_mutable.py: fix minor typo
2009-08-15 04:28:46 -07:00
..
__init__.py re-enable incident-reporting, but disable it in unit tests, because they take 150% longer, and the leftover trailing timers cause errors 2008-07-06 23:49:08 -07:00
bench_dirnode.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
check_grid.py check_grid.py: print stderr when a subcommand fails 2009-06-22 19:28:33 -07:00
check_load.py shebang: replace "/usr/bin/python" with "/usr/bin/env python" 2008-11-04 18:03:06 -07:00
check_memory.py switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem 2009-05-21 17:46:32 -07:00
check_speed.py switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem 2009-05-21 17:46:32 -07:00
common_util.py tests: stop using setUpClass/tearDownClass, since they've been deprecated in Twisted-8.2.0 2009-02-23 14:43:12 -07:00
common_web.py tests/no_network: move GET into the GridTestMixin class 2009-02-24 18:33:00 -07:00
common.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
figleaf.excludes move all packages into src/, fix allmydata.Crypto build. Now you must perform a 'setup.py build' before using anything, and you must add the build directory (build/lib.linux-i686-2.4) to your PYTHONPATH before doing anything 2006-12-14 03:39:50 -07:00
no_network.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_backupdb.py test_backupdb: make the not-a-database file larger, since the older sqlite-2.3.2 on OS-X is easily fooled 2009-02-19 18:04:09 -07:00
test_base62.py docs: update relnotes.txt, relnotes-short.txt, and others documentation bits for v1.5.0 release! 2009-08-01 19:57:10 -07:00
test_checker.py big rework of introducer client: change local API, split division of responsibilites better, remove old-code testing, improve error logging 2009-06-22 19:10:47 -07:00
test_cli.py Touch up #705 changes: 2009-07-20 11:38:03 -04:00
test_client.py Tolerate unknown URI types in directory structures. Part of #683. 2009-07-02 18:07:49 -07:00
test_codec.py download: refactor handling of URI Extension Block and crypttext hash tree, simplify things 2008-12-05 08:17:54 -07:00
test_consolidate.py consolidator: re-use more directories, add total directories seen-vs-used counts 2009-03-12 20:48:01 -07:00
test_crawler.py switch all foolscap imports to use foolscap.api or foolscap.logging 2009-05-21 17:38:23 -07:00
test_deepcheck.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_dirnode.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_download.py test: multiple by 10 or so all timeouts that Zandr's ARM box just overran 2009-06-10 05:56:39 -07:00
test_encode.py clean up storage_broker interface: should fix #732 2009-06-21 16:51:19 -07:00
test_filenode.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_hashtree.py hashtree: fix tests of depth_of 2009-04-03 16:56:14 -07:00
test_helper.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_immutable.py hush pyflakes by removing unused imports 2009-01-12 15:41:20 -07:00
test_introducer.py remove introducer/old.py, will create something similar when the RIIntroducer changes 2009-06-24 12:40:38 -07:00
test_iputil.py 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
test_keygen.py switch to using RemoteException instead of 'wrapped' RemoteReferences. Should fix #653, the rref-EQ problem 2009-05-21 17:46:32 -07:00
test_mutable.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_netstring.py directories: keep track of your position as you decode netstring after netstring from an input buffer instead of copying the trailing part 2009-07-04 19:51:09 -07:00
test_nevow.py test: update todo string in test_nevow 2008-02-29 13:10:08 -07:00
test_no_network.py test/no_network: new test harness, like system-test but doesn't use the network so it's faster 2009-02-16 14:58:44 -07:00
test_node.py switch all foolscap imports to use foolscap.api or foolscap.logging 2009-05-21 17:38:23 -07:00
test_observer.py test_observer: improve test coverage 2007-03-08 16:13:14 -07:00
test_provisioning.py reliability.py: fix the numpy conversion, it was completely broken. Thanks to Terrell Russell for the help. 2009-02-19 13:55:15 -07:00
test_repairer.py test_repairer: change to use faster no_network.GridTestMixin, split Verifier tests into separate cases, refactor judgement funcs into shared methods 2009-02-23 22:15:06 -07:00
test_runner.py test_runner.py: tolerate symlinks in the source tree directory's ancestor path 2009-07-30 10:17:24 -07:00
test_stats.py 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
test_storage.py PollMixin: snoop trial's error observer to halt the test early if an error is seen. This turns a lot of timeouts into fast failures. 2009-06-22 19:07:31 -07:00
test_system.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_upload.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
test_uri.py rename NewDirectoryNode to DirectoryNode, NewDirectoryURI to DirectoryURI 2009-07-17 17:15:49 -05:00
test_util.py test_util: add known-answer tests for hashutil tags 2009-06-17 21:57:09 -07:00
test_web.py Overhaul IFilesystemNode handling, to simplify tests and use POLA internally. 2009-08-15 04:28:46 -07:00
trial_figleaf.py trial_figleaf.py: make our figleaf code compatible with both Twisted-8.x and Twisted-2.5.x 2008-04-02 17:48:55 -07:00