async def test_run_module_timetest(): os.chdir(HERE) output = await run_module(load_inventory('inventory.yml'), ['modules'], 'timetest') pprint(output) assert output['localhost'] clean_up_ftl_cache() clean_up_tmp()
async def test_run_ftl_module(): os.chdir(HERE) output = await run_ftl_module(load_inventory('inventory.yml'), ['ftl_modules'], 'argtest') pprint(output) assert output['localhost'] assert output['localhost'] == {'args': (), 'kwargs': {}} clean_up_ftl_cache() clean_up_tmp()
async def test_run_module_argtest_remote(): os.chdir(HERE) output = await run_module(load_inventory('inventory2.yml'), ['modules'], 'argtest', module_args=dict(somekey='somevalue')) pprint(output) assert output['localhost'] assert output['localhost']['args'] assert output['localhost']['executable'] assert output['localhost']['more_args'] == 'somekey=somevalue' assert output['localhost']['files'] clean_up_ftl_cache() clean_up_tmp()
def test_inventory(): os.chdir(HERE) inventory = load_inventory('inventory.yml') assert inventory