You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/t/test_ngcpcfg_build_network_...

26 lines
664 B

#!/usr/bin/env py.test-3
import pytest
import re
from fixtures.fs import check_output
@pytest.mark.tt_47255
def test_network_interfaces(ngcpcfgcli):
out = ngcpcfgcli(
"build",
"--ignore-branch-check",
"/etc/network/interfaces",
env={
"NGCPCFG": "fixtures/ngcpcfg_network_interfaces.cfg",
},
)
assert re.search(r"Generating .*/etc/network/interfaces: OK", out.stdout)
assert not re.search(r"Error", out.stdout)
output_file = out.env["OUTPUT_DIRECTORY"].joinpath("etc/network/interfaces")
test_file = "fixtures/output/network_interfaces"
check_output(str(output_file), test_file)