blob: 687f3ae7798faa859fa91259e8a6961322e429da [file] [log] [blame]
Hanna Arhipovae6ed8e42019-05-15 16:27:08 +03001import json
2import pytest
3
4
5def test_minions_status(local_salt_client):
6 result = local_salt_client.cmd(
7 tgt='salt:master',
8 param='salt-run manage.status timeout=10 --out=json',
9 expr_form='pillar', check_status=True)
10 statuses = {}
11 try:
12 statuses = json.loads(result.values()[0])
13 except Exception as e:
14 pytest.fail(
15 "Could not check the result: {}\n"
16 "Nodes status result: {}".format(e, result))
17 assert not statuses["down"], "Some minions are down:\n {}".format(
18 statuses["down"])