Skip to content
Snippets Groups Projects
Commit 806e52a0 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

explain some more of what we're doing with test resources

parent e12dc3c1
No related branches found
No related tags found
1 merge request!298Add Tahoe-LAFS `upload` and `download` helpers
......@@ -162,10 +162,20 @@ class TahoeStorageManager(TestResourceManager):
resources = [("node_dir", TemporaryDirectoryResource())]
# This doesn't clean up the given resource - it cleans up the global
# runtime environment in which that resource was created - by destroying
# anything associated with it which Python will not automatically clean up
# when the Python objects are garbage collected.
def clean(self, storage):
"""
Kill the storage node child process.
"""
storage.process.kill()
def make(self, dependency_resources):
"""
Create and run a brand new Tahoe-LAFS storage node.
"""
storage = TahoeStorage(**dependency_resources)
storage.run()
return storage
......@@ -254,10 +264,17 @@ class TahoeClientManager(TestResourceManager):
("node_dir", TemporaryDirectoryResource()),
]
# See note on TahoeStorageManager.clean
def clean(self, client):
"""
Kill the client node child process.
"""
client.process.kill()
def make(self, dependency_resources):
"""
Create and run a brand new Tahoe-LAFS client node.
"""
client = TahoeClient(**dependency_resources)
client.run()
return client
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment