fix masterapi test to use testing directory for configs

This commit is contained in:
Daniel Wallace 2018-06-05 15:14:50 -05:00
parent 5a41f484ef
commit 556a2067fc
No known key found for this signature in database
GPG Key ID: 5FA5E5544F010D48

View File

@ -2,12 +2,14 @@
# Import Python libs
from __future__ import absolute_import
import os
# Import Salt libs
import salt.config
import salt.daemons.masterapi as masterapi
# Import Salt Testing Libs
from tests.support.paths import TMP_CONF_DIR
from tests.support.unit import TestCase
from tests.support.mock import (
patch,
@ -33,7 +35,7 @@ class RemoteFuncsTestCase(TestCase):
'''
def setUp(self):
opts = salt.config.master_config(None)
opts = salt.config.master_config(os.path.join(TMP_CONF_DIR, 'master'))
self.funcs = masterapi.RemoteFuncs(opts)
self.funcs.cache = FakeCache()