add unused for now veriy step

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-19 17:28:13 +01:00
parent 8fc95fd208
commit 19e8027f7c
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 34 additions and 3 deletions

View File

@ -4,11 +4,11 @@
vars:
consul_config_name: '{{ miner_cont_name | replace("-", "_") }}'
consul_services:
- id: '{{ miner_cont_name }}'
name: '{{ miner_cont_name }}'
- name: '{{ miner_cont_name }}'
tags: ['{{ env }}.{{ stage }}', 'geth', 'miner', 'faucet']
port: '{{ miner_main_port }}'
tags: ['{{ env }}.{{ stage }}', 'geth', 'miner']
checks:
- id: geth-miner-rpc-health
name: Geth Miner RPC Health
type: script
script: 'curl -s -X POST -H Content-type:application/json --data {"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1} http://localhost:{{ miner_rpc_port }}/'

View File

@ -0,0 +1,31 @@
---
- name: Get account wallet state
docker_container:
name: 'geth-account-verify'
image: '{{ miner_cont_image }}'
user: root
pull: true
detach: false
interactive: true
command: |
--datadir=/data
--password=/data/faucet.pass
--networkid={{ miner_network_id }}
--verbosity=1
console
--exec=personal.listWallets
volumes:
- '{{ miner_cont_vol }}/data:/data:rw'
register: geth_wallets
- debug: msg={{geth_wallets}}
- name: Extract wallet state
set_fact:
wallet_state: '{{ geth_wallets.stdout | from_json | json_query(".[0].status") }}'
- name: Verify the account wallet can be unlocked
assert:
that:
- '{{ wallet_state == "Unlocked" }}'
msg: 'Wallet state must be unlocked!'