Merge pull request #49030 from rallytime/update-client-tests

Update netapi client tests
This commit is contained in:
Nicole Thomas 2018-08-09 13:11:14 -04:00 committed by GitHub
commit 1db036406b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,10 +3,11 @@
# Import Python libs
from __future__ import absolute_import
import os
import time
# Import Salt Testing libs
from tests.support.unit import TestCase
from tests.support.paths import TMP_CONF_DIR
from tests.support.unit import TestCase, skipIf
# Import Salt libs
import salt.config
@ -73,6 +74,8 @@ class NetapiClientTest(TestCase):
self.assertTrue(set(['master.pem', 'master.pub']).issubset(set(ret['data']['return']['local'])))
def test_wheel_async(self):
# Give this test a little breathing room
time.sleep(3)
low = {'client': 'wheel_async', 'fun': 'key.list_all'}
low.update(self.eauth_creds)
@ -80,6 +83,7 @@ class NetapiClientTest(TestCase):
self.assertIn('jid', ret)
self.assertIn('tag', ret)
@skipIf(True, 'This is not testing anything. Skipping for now.')
def test_runner(self):
# TODO: fix race condition in init of event-- right now the event class
# will finish init even if the underlying zmq socket hasn't connected yet
@ -91,6 +95,7 @@ class NetapiClientTest(TestCase):
ret = self.netapi.run(low)
@skipIf(True, 'This is not testing anything. Skipping for now.')
def test_runner_async(self):
low = {'client': 'runner', 'fun': 'cache.grains'}
low.update(self.eauth_creds)