blob: 6ab48dfa51cba78e34c3840e2efb5595c4874cdd [file] [log] [blame]
Ievgeniia Zadorozhnaac850452019-01-27 22:31:38 +03001import json
2import pytest
3
4
Oleksii Zhurba5b15b9b2019-05-09 18:53:40 -05005@pytest.mark.smoke
6#move to sl?
Ievgeniia Zadorozhnaac850452019-01-27 22:31:38 +03007def test_minions_status(local_salt_client):
8 result = local_salt_client.cmd(
Oleksii Zhurba4bfd2ee2019-04-10 21:56:58 -05009 tgt='salt:master',
10 param='salt-run manage.status timeout=10 --out=json',
11 expr_form='pillar', check_status=True)
Ievgeniia Zadorozhnaac850452019-01-27 22:31:38 +030012 statuses = {}
13 try:
14 statuses = json.loads(result.values()[0])
15 except Exception as e:
16 pytest.fail(
17 "Could not check the result: {}\n"
18 "Nodes status result: {}".format(e, result))
19 assert not statuses["down"], "Some minions are down:\n {}".format(
20 statuses["down"])