mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-05 21:51:45 +00:00
Merge pull request #1375 from meejah/4110.storage-dir-option
4110: "--storage-dir" is an option
This commit is contained in:
commit
6d37fa6c9d
3
newsfragments/4110.incompat
Normal file
3
newsfragments/4110.incompat
Normal file
@ -0,0 +1,3 @@
|
||||
Properly interpret "tahoe create --storage-dir" as an option.
|
||||
|
||||
Versions 1.19.0 and older interpreted "--storage-dir" as a "flag" and thus wouldn't work properly.
|
@ -234,13 +234,15 @@ class CreateClientOptions(_CreateBaseOptions):
|
||||
class CreateNodeOptions(CreateClientOptions):
|
||||
optFlags = [
|
||||
("no-storage", None, "Do not offer storage service to other nodes."),
|
||||
("storage-dir", None, "Path where the storage will be placed."),
|
||||
("helper", None, "Enable helper"),
|
||||
] + TOR_FLAGS + I2P_FLAGS
|
||||
|
||||
synopsis = "[options] [NODEDIR]"
|
||||
description = "Create a full Tahoe-LAFS node (client+server)."
|
||||
optParameters = CreateClientOptions.optParameters + WHERE_OPTS + TOR_OPTS + I2P_OPTS
|
||||
|
||||
optParameters = [
|
||||
("storage-dir", None, None, "Path where the storage will be placed."),
|
||||
] + CreateClientOptions.optParameters + WHERE_OPTS + TOR_OPTS + I2P_OPTS
|
||||
|
||||
def parseArgs(self, basedir=None):
|
||||
CreateClientOptions.parseArgs(self, basedir)
|
||||
|
@ -240,6 +240,13 @@ class Config(unittest.TestCase):
|
||||
self.assertEqual(cfg.getboolean("node", "reveal-IP-address"), True)
|
||||
self.assertFalse(cfg.has_section("connections"))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_storage_dir(self):
|
||||
basedir = self.mktemp()
|
||||
rc, out, err = yield run_cli("create-node", "--storage-dir", "/tmp/storage", "--hostname=foo", basedir)
|
||||
cfg = read_config(basedir)
|
||||
self.assertEqual(cfg.get("storage", "storage_dir"), "/tmp/storage")
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_node_hide_ip(self):
|
||||
basedir = self.mktemp()
|
||||
|
Loading…
x
Reference in New Issue
Block a user