MT#58458 tests: remove duplicate .git extract

The process_pool function already extracts the provided tarball to
initialise an empty git repo. Doing it again when creating the
directories is redundant. Use the appropriate /etc path for config file
output.

Change-Id: I3c598a4b1ddf3a65f7f1759c9b29f1f7d1c098bf
mr13.5
Richard Fuchs 1 year ago
parent 26de469617
commit b765ca30db

@ -94,10 +94,9 @@ def copy_tree(base, src, dst_dir):
@pytest.fixture()
def ngcpcfg(gitrepo, tmpdir, *args):
fakehome = Path(tmpdir.mkdir("fakehome")).resolve()
outdir = Path(
gitrepo.extract_archive(str(EMPTY_GIT),
tmpdir.mkdir("ngcp-pytest-output"))
)
outdir = Path(tmpdir.mkdir("ngcp-pytest-output"))
basedir = outdir.joinpath("etc")
basedir.mkdir()
rundir = Path(tmpdir.mkdir("ngcp-pytest-rundir"))
statedir = Path(tmpdir.mkdir("var-lib-ngcpcfg-state"))
ngcpctl_dir = Path(
@ -207,7 +206,7 @@ def ngcpcfg(gitrepo, tmpdir, *args):
return testenv, config["ngcpcfg"]
config = read_cfg(testenv["NGCPCFG"], env)
testenv["NGCPCTL_BASE"] = outdir
testenv["NGCPCTL_BASE"] = basedir
testenv["NGCPCTL_MAIN"] = ngcpctl_dir
for key in CFG_EXTRA:
if not isinstance(testenv[key], Path):

Loading…
Cancel
Save