コード例 #1
0
ファイル: test_core.py プロジェクト: X-Ops/salt-mill
def test_auto_login():
    mill = Mill()
    MSG = 'This is a test.'
    ret = mill.local('*', 'test.echo', MSG)
    assert len(ret['return'][0]) > 0
    for salt_id, msg in ret['return'][0].iteritems():
        assert msg == MSG
コード例 #2
0
ファイル: test_core.py プロジェクト: X-Ops/salt-mill
def test_renew_auth_token():
    mill = Mill()
    mill.login()

    mill.auth['token'] = 'invalid'
    MSG = 'This is a test.'
    ret = mill.local('*', 'test.echo', MSG)
    assert len(ret['return'][0]) > 0
コード例 #3
0
ファイル: test_core.py プロジェクト: X-Ops/salt-mill
def test_login():
    mill = Mill()
    mill.login()
コード例 #4
0
ファイル: test_core.py プロジェクト: sbs081/salt-mill
def test_local_poll():
    mill = Mill()
    mill.login()
    MSG = 'This is a test.'
    ret = mill.local_poll('*', 'test.echo', MSG)
    assert len(ret['return'][0]) > 0