How to use test_plugin_configuration method in yandex-tank

Best Python code snippet using yandex-tank

test_plugin.py

Source:test_plugin.py Github

copy

Full Screen

...4from yandextank.core.tankcore import TankCore5from yandextank.core.tankworker import TankInfo6from yandextank.plugins.Telegraf import Plugin as TelegrafPlugin7class TestTelegrafPlugin(object):8 def test_plugin_configuration(self):9 """ testing telegraf plugin configuration """10 cfg = {11 'core': {},12 'telegraf': {13 'package': 'yandextank.plugins.Telegraf',14 'enabled': True,15 'config': os.path.join(get_test_path(), 'yandextank/plugins/Telegraf/tests/telegraf_mon.xml')16 }17 }18 core = TankCore(cfg, threading.Event(), TankInfo({}))19 telegraf_plugin = core.get_plugin_of_type(TelegrafPlugin)20 telegraf_plugin.configure()21 assert telegraf_plugin.detected_conf == 'telegraf'22 def test_legacy_plugin_configuration(self):...

Full Screen

Full Screen

test_scale_to_zero.py

Source:test_scale_to_zero.py Github

copy

Full Screen

2from datasette_scale_to_zero import get_config3import pytest4@pytest.mark.asyncio5@pytest.mark.parametrize("invalid_duration", [1, "2", "3min", "dog"])6async def test_plugin_configuration(invalid_duration):7 with pytest.raises(ValueError) as ex:8 ds = Datasette(9 memory=True,10 metadata={11 "plugins": {"datasette-scale-to-zero": {"duration": invalid_duration}}12 },13 )14 await ds.invoke_startup()15 assert (16 ex.value.args[0] == "duration must be a number followed by a unit (s, m, h)"17 )18@pytest.mark.parametrize(19 "duration,expected",20 (...

Full Screen

Full Screen

test_config.py

Source:test_config.py Github

copy

Full Screen

...7 (20, 20),8 ],9)10@pytest.mark.asyncio11async def test_plugin_configuration(setting, expected):12 ds = Datasette(13 [],14 memory=True,15 metadata={16 "plugins": {"datasette-leaflet-geojson": {"default_maps_to_load": setting}}17 },18 )19 html = (await ds.client.get("/")).text20 assert (21 "<script>window.DATASETTE_LEAFLET_GEOJSON_DEFAULT_MAPS_TO_LOAD = {};</script>".format(22 expected23 )24 in html25 )

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run yandex-tank automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful