(self, settings_path)
| 20 | self.uses_wallet = None |
| 21 | |
| 22 | def test_wallet_settings(self, settings_path): |
| 23 | if not self.is_wallet_compiled(): |
| 24 | return |
| 25 | |
| 26 | self.log.info("Testing wallet settings..") |
| 27 | node = self.nodes[0] |
| 28 | # Create wallet to use it during tests |
| 29 | self.start_node(0) |
| 30 | node.createwallet(wallet_name='w1') |
| 31 | self.stop_node(0) |
| 32 | |
| 33 | # Verify wallet settings can only be strings. Either names or paths. Not booleans, nums nor anything else. |
| 34 | for wallets_data in [[10], [True], [[]], [{}], ["w1", 10], ["w1", False]]: |
| 35 | with settings_path.open("w") as fp: |
| 36 | json.dump({"wallet": wallets_data}, fp) |
| 37 | node.assert_start_raises_init_error(expected_msg="Error: Invalid value detected for '-wallet' or '-nowallet'. '-wallet' requires a string value, while '-nowallet' accepts only '1' to disable all wallets", |
| 38 | extra_args=[f'-settings={settings_path}']) |
| 39 | |
| 40 | def run_test(self): |
| 41 | node, = self.nodes |
no test coverage detected