def init(ctx: Test) -> Tinc:
"""Initialize new test nodes."""
- node = ctx.node()
+ node = ctx.node(init=f"set Sandbox {SANDBOX_LEVEL}")
node.add_script(Script.TINC_UP)
- stdin = f"""
- init {node}
- set Address localhost
- set Port 0
- set DeviceType dummy
- set Sandbox {SANDBOX_LEVEL}
- """
- node.cmd(stdin=stdin)
return node
node.cmd("stop")
log.info("checking tincd exit code")
- check.equals(0, tincd.wait())
+ check.success(tincd.wait())
with Test("foreground mode") as context: