Example #1
0
def runner(farm):
    """Create a coco runner."""
    CONFIG["groups"] = {"test": farm.hosts}
    state = {
        STATE_PATH.split("/")[1]: True,
        STATE_PATH_FAIL_TYPE.split("/")[1]: "not_a_bool",
        STATE_PATH_FAIL_VAL.split("/")[1]: False,
    }
    json.dump(state, STATEFILE)
    STATEFILE.flush()
    CONFIG["load_state"] = {STATE_PATH.split("/")[0]: STATEFILE.name}
    print(STATEFILE.name)
    with coco_runner.Runner(CONFIG, ENDPOINTS, reset_on_start=True) as runner:
        yield runner
Example #2
0
def runner(farm):
    """Create a coco runner."""
    CONFIG["groups"] = {"test": farm.hosts}
    with coco_runner.Runner(CONFIG, ENDPOINTS) as runner:
        yield runner
def runner():
    with coco_runner.Runner(CONFIG, ENDPOINTS) as runner:
        yield runner
def reset_runner():
    """Create a coco runner that resets the state on start."""
    with coco_runner.Runner(CONFIG, ENDPOINTS, reset_on_start=True) as runner:
        yield runner
def runner():
    """Create a coco runner that doesn't reset on exit."""
    with coco_runner.Runner(CONFIG, ENDPOINTS, reset_on_shutdown=False) as runner:
        yield runner