|
8 | 8 |
|
9 | 9 | 1. `bitcoind` with no -asmap arg, using /16 prefix for IP bucketing |
10 | 10 |
|
11 | | -2. `bitcoind -asmap=<relative path>`, using the unit test skeleton asmap |
| 11 | +2. `bitcoind -asmap=<absolute path>`, using the unit test skeleton asmap |
12 | 12 |
|
13 | | -3. `bitcoind -asmap/-asmap=` with no file specified, using the default asmap |
| 13 | +3. `bitcoind -asmap=<relative path>`, using the unit test skeleton asmap |
14 | 14 |
|
15 | | -4. `bitcoind -asmap` with no file specified, and a missing default asmap file |
| 15 | +4. `bitcoind -asmap/-asmap=` with no file specified, using the default asmap |
| 16 | +
|
| 17 | +5. `bitcoind -asmap` with no file specified and a missing default asmap file |
16 | 18 |
|
17 | 19 | The tests are order-independent. The slowest test (missing default asmap file) |
18 | 20 | is placed last. |
@@ -42,6 +44,15 @@ def test_without_asmap_arg(self): |
42 | 44 | with self.node.assert_debug_log(['Using /16 prefix for IP bucketing']): |
43 | 45 | self.start_node(0) |
44 | 46 |
|
| 47 | + def test_asmap_with_absolute_path(self): |
| 48 | + self.log.info('Test bitcoind -asmap=<absolute path>') |
| 49 | + self.stop_node(0) |
| 50 | + filename = os.path.join(self.datadir, 'my-map-file.map') |
| 51 | + shutil.copyfile(self.asmap_raw, filename) |
| 52 | + with self.node.assert_debug_log(expected_messages(filename)): |
| 53 | + self.start_node(0, ['-asmap={}'.format(filename)]) |
| 54 | + os.remove(filename) |
| 55 | + |
45 | 56 | def test_asmap_with_relative_path(self): |
46 | 57 | self.log.info('Test bitcoind -asmap=<relative path>') |
47 | 58 | self.stop_node(0) |
@@ -74,6 +85,7 @@ def run_test(self): |
74 | 85 | self.asmap_raw = os.path.join(os.path.dirname(os.path.realpath(__file__)), ASMAP) |
75 | 86 |
|
76 | 87 | self.test_without_asmap_arg() |
| 88 | + self.test_asmap_with_absolute_path() |
77 | 89 | self.test_asmap_with_relative_path() |
78 | 90 | self.test_default_asmap() |
79 | 91 | #self.test_default_asmap_with_missing_file() // fixme |
|
0 commit comments