1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
from bundlewrap.utils.testing import host_os, make_repo, run
def test_run_ok(tmpdir):
make_repo(
tmpdir,
nodes={
"localhost": {
'os': host_os(),
},
},
)
stdout, stderr, rcode = run("BW_TABLE_STYLE=grep bw run localhost true", path=str(tmpdir))
assert rcode == 0
assert b"localhost\t0" in stdout
assert stderr == b""
def test_run_fail(tmpdir):
make_repo(
tmpdir,
nodes={
"localhost": {
'os': host_os(),
},
},
)
stdout, stderr, rcode = run("BW_TABLE_STYLE=grep bw run localhost false", path=str(tmpdir))
assert rcode == 0
assert b"localhost\t1" in stdout
assert stderr == b""
|