Clean up cruft

This commit is contained in:
Daniel A. Wozniak 2019-06-27 07:23:21 +00:00
parent 68958f5b68
commit a74580be13
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61
3 changed files with 7 additions and 21 deletions

View file

@ -2255,7 +2255,6 @@ class Minion(MinionBase):
'''
Manage Beacons
'''
log.error("GOT MANAGE BEACONS %s %s", tag, data)
func = data.get('func', None)
name = data.get('name', None)
beacon_data = data.get('beacon_data', None)

View file

@ -110,7 +110,6 @@ def list_available(return_yaml=True, **kwargs):
event_ret = eventer.get_event(
tag='/salt/minion/minion_beacons_list_available_complete',
wait=kwargs.get('timeout', default_event_wait))
log.error("EVENT RET IS %r", event_ret)
if event_ret and event_ret['complete']:
beacons = event_ret['beacons']
except KeyError:

View file

@ -7,11 +7,6 @@ from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing Libs
from tests.support.case import ModuleCase
from tests.support.mixins import SaltReturnAssertsMixin
from tests.support.helpers import flaky
from salt.ext.six.moves import range
import logging
log = logging.getLogger(__name__)
class BeaconStateTestCase(ModuleCase, SaltReturnAssertsMixin):
@ -24,23 +19,16 @@ class BeaconStateTestCase(ModuleCase, SaltReturnAssertsMixin):
self.run_function('beacons.reset', f_timeout=300)
def tearDown(self):
self.run_function('beacons.reset', f_timeout=30)
self.run_function('beacons.reset', f_timeout=300)
@flaky
def test_present_absent(self):
kwargs = {'/': '38%', 'interval': 5}
# TODO: Figure out why this will sometimes return 'Beacon "diskusage"
# is not available.' The loop works around that issue for now
for _ in range(10):
ret = self.run_state(
'beacon.present',
name='diskusage',
f_timeout=300,
**kwargs
)
log.error("RET %s", ret)
if ret['beacon_|-diskusage_|-diskusage_|-present']['result'] is True:
break
ret = self.run_state(
'beacon.present',
name='diskusage',
f_timeout=300,
**kwargs
)
self.assertSaltTrueReturn(ret)
ret = self.run_function('beacons.list',