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