(self)
| 35 | return out, err |
| 36 | |
| 37 | def run_test(self): |
| 38 | self.log.info("Start bitcoin with -h for help text") |
| 39 | self.nodes[0].start(extra_args=['-h']) |
| 40 | # Node should exit immediately and output help to stdout. |
| 41 | output, _ = self.get_node_output(ret_code_expected=0) |
| 42 | assert b'Options' in output |
| 43 | self.log.info(f"Help text received: {output[0:60]} (...)") |
| 44 | |
| 45 | self.log.info("Start bitcoin with -version for version information") |
| 46 | self.nodes[0].start(extra_args=['-version']) |
| 47 | # Node should exit immediately and output version to stdout. |
| 48 | output, _ = self.get_node_output(ret_code_expected=0) |
| 49 | assert b'version' in output |
| 50 | self.log.info(f"Version text received: {output[0:60]} (...)") |
| 51 | |
| 52 | # Test that arguments not in the help results in an error |
| 53 | self.log.info("Start bitcoind with -fakearg to make sure it does not start") |
| 54 | self.nodes[0].start(extra_args=['-fakearg']) |
| 55 | # Node should exit immediately and output an error to stderr |
| 56 | _, output = self.get_node_output(ret_code_expected=1) |
| 57 | assert b'Error parsing command line arguments' in output |
| 58 | self.log.info(f"Error message received: {output[0:60]} (...)") |
| 59 | |
| 60 | |
| 61 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected