mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
Fix unit tests
This commit is contained in:
parent
6c3e198090
commit
01d277b804
@ -7,6 +7,7 @@ from Tests.ConsoleOnlinePluginTest import FakeConsoleMarkup
|
||||
from Tests.TankTests import TankTestCase
|
||||
import logging
|
||||
import time
|
||||
import tempfile
|
||||
|
||||
class MonitoringCollectorTestCase(TankTestCase):
|
||||
data = None
|
||||
@ -23,6 +24,7 @@ class MonitoringCollectorTestCase(TankTestCase):
|
||||
|
||||
def test_plugin_disabled(self):
|
||||
core = TankCore()
|
||||
core.artifacts_base_dir=tempfile.mkdtemp()
|
||||
mon = MonitoringPlugin(core)
|
||||
core.set_option(mon.SECTION, 'config', 'none')
|
||||
mon.configure()
|
||||
@ -37,6 +39,7 @@ class MonitoringCollectorTestCase(TankTestCase):
|
||||
|
||||
def test_plugin_default(self):
|
||||
core = TankCore()
|
||||
core.artifacts_base_dir=tempfile.mkdtemp()
|
||||
core.load_configs(['config/monitoring.conf'])
|
||||
core.load_plugins()
|
||||
core.plugins_configure()
|
||||
@ -55,6 +58,7 @@ class MonitoringCollectorTestCase(TankTestCase):
|
||||
|
||||
def test_plugin_config(self):
|
||||
core = TankCore()
|
||||
core.artifacts_base_dir=tempfile.mkdtemp()
|
||||
core.load_configs(['config/monitoring.conf'])
|
||||
core.load_plugins()
|
||||
core.plugins_configure()
|
||||
@ -74,6 +78,7 @@ class MonitoringCollectorTestCase(TankTestCase):
|
||||
|
||||
def test_widget(self):
|
||||
core = TankCore()
|
||||
core.artifacts_base_dir=tempfile.mkdtemp()
|
||||
owner = MonitoringPlugin(core)
|
||||
owner.monitoring=1
|
||||
widget = MonitoringWidget(owner)
|
||||
|
@ -10,6 +10,7 @@ from Tank.Plugins.Aggregator import AggregatorPlugin
|
||||
class PhantomPluginTestCase(TankTestCase):
|
||||
def setUp(self):
|
||||
core = TankCore()
|
||||
core.artifacts_base_dir=tempfile.mkdtemp()
|
||||
(name) = tempfile.mkstemp()[1]
|
||||
core.config.set_out_file(name)
|
||||
core.load_configs(['config/phantom.conf'])
|
||||
|
Loading…
Reference in New Issue
Block a user