neoneo-go/cli
Anna Shaleva 8ff7cd865d cli: ensure chain is properly stopped after chain-related commands
Blockchain occupies resources (e.g. it opens log files for DB, etc.)
on creation and running. We need to release these resources if something
goes wrong during execution chain-related commands.

This commit solves the following problem on Windows:
```
--- FAIL: TestServerStart (0.32s)
    --- FAIL: TestServerStart/stateroot_service_is_on_&&_StateRootInHeader=true (0.04s)
        testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_stateroot_service_is_on_&&_StateRootInHeader=true460557297\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
    --- FAIL: TestServerStart/invalid_Oracle_config (0.03s)
        testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Oracle_config810064028\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
    --- FAIL: TestServerStart/invalid_consensus_config (0.04s)
        testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_consensus_config217270091\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
    --- FAIL: TestServerStart/invalid_Notary_config (0.07s)
        --- FAIL: TestServerStart/invalid_Notary_config/malformed_config (0.04s)
            testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Notary_config_malformed_config754934830\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
        --- FAIL: TestServerStart/invalid_Notary_config/invalid_wallet (0.03s)
            testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Notary_config_invalid_wallet934249397\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
    --- FAIL: TestServerStart/good (0.11s)
        testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_good596150160\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process.
```

This commit also unifies blockchain and services releasing code.
2022-02-10 10:33:36 +03:00
..
cmdargs cli/smartcontract: allow to deploy contracts with scope 2021-10-13 15:55:42 +03:00
flags *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
input cli: allow to relay transaction on Enter 2021-12-09 19:14:01 +03:00
options cli: fix TestGetTimeoutContext test 2021-11-18 17:35:15 +03:00
paramcontext context: support Neo.Network.P2P.Payloads.Transaction type 2021-07-23 11:33:51 +03:00
query cli/wallet: allow to testinvoke transaction before signing 2021-09-23 11:48:25 +03:00
server cli: ensure chain is properly stopped after chain-related commands 2022-02-10 10:33:36 +03:00
smartcontract cli: add tests for smartcontract-related commands 2022-02-02 11:28:29 +03:00
testdata cli: add scope check tests for invocations 2021-11-22 12:46:42 +03:00
util cli/wallet: allow to testinvoke transaction before signing 2021-09-23 11:48:25 +03:00
vm cli: support escape codes 2021-02-11 16:06:11 +03:00
wallet cli: add tests for wallet-related commands 2022-02-02 13:48:12 +03:00
.gitignore Better error messages (#24) 2018-02-24 10:10:45 +01:00
candidate_test.go cli/wallet: show tx fee before relaying 2021-09-21 11:31:56 +03:00
contract_test.go cli: use ioutil instead of os to read/write files 2022-02-02 13:48:17 +03:00
dump_test.go cli: use ioutil instead of os to read/write files 2022-02-02 13:48:17 +03:00
executor_test.go cli: add tests for server commands 2022-02-02 11:28:26 +03:00
main.go cli: add query tx command, fix #2069 2021-07-20 18:03:50 +03:00
main_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
multisig_test.go cli: add tests for wallet-related commands 2022-02-02 13:48:12 +03:00
nep11_test.go Merge pull request #2264 from nspcc-dev/fix-win-tests 2021-11-29 11:25:35 +03:00
nep17_test.go cli: print zero balance of known token if token flag specified 2021-12-28 11:41:38 +03:00
options_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
query_test.go cli/wallet: allow to testinvoke transaction before signing 2021-09-23 11:48:25 +03:00
server_test.go cli: use ioutil instead of os to read/write files 2022-02-02 13:48:17 +03:00
util_test.go cli: add tests for smartcontract-related commands 2022-02-02 11:28:29 +03:00
wallet_test.go cli: add tests for wallet-related commands 2022-02-02 13:48:12 +03:00