wip run full integration from tmp recipes dir
This commit is contained in:
parent
4c6e6685da
commit
a549843f74
1 changed files with 16 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
@ -8,12 +9,20 @@ from pytest_abra.utils import load_json_to_environ
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def session_tmp_path_testout(tmp_path_factory: pytest.TempPathFactory) -> Path:
|
def tmp_recipes(tmp_path_factory: pytest.TempPathFactory) -> Path:
|
||||||
return tmp_path_factory.mktemp("test_out")
|
tmp_recipes_target = tmp_path_factory.mktemp("recipes")
|
||||||
|
recipes_dir_source = Path("recipes")
|
||||||
|
shutil.copytree(recipes_dir_source, tmp_recipes_target, dirs_exist_ok=True)
|
||||||
|
return tmp_recipes_target
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def tmp_output(tmp_path_factory: pytest.TempPathFactory) -> Path:
|
||||||
|
return tmp_path_factory.mktemp("output")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
|
def test_abratest_cli_full_integration(tmp_output: Path, tmp_recipes: Path):
|
||||||
"""run abratest against the dev instance"""
|
"""run abratest against the dev instance"""
|
||||||
|
|
||||||
# --------------------- load credentials to env variables -------------------- #
|
# --------------------- load credentials to env variables -------------------- #
|
||||||
|
|
@ -33,9 +42,8 @@ def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
|
||||||
|
|
||||||
# ----------------------------------- dirs ----------------------------------- #
|
# ----------------------------------- dirs ----------------------------------- #
|
||||||
|
|
||||||
RECIPES_DIR = Path("./recipes").resolve()
|
RECIPES_DIR = tmp_recipes.resolve()
|
||||||
# OUTPUT_DIR = Path("./test-output").resolve()
|
OUTPUT_DIR = tmp_output.resolve()
|
||||||
OUTPUT_DIR = session_tmp_path_testout.resolve()
|
|
||||||
|
|
||||||
# ------------------------------------ run ----------------------------------- #
|
# ------------------------------------ run ----------------------------------- #
|
||||||
|
|
||||||
|
|
@ -57,8 +65,8 @@ def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
def test_results_abra(session_tmp_path_testout: Path):
|
def test_results_abra(tmp_output: Path):
|
||||||
OUTPUT_DIR = session_tmp_path_testout.resolve()
|
OUTPUT_DIR = tmp_output.resolve()
|
||||||
|
|
||||||
DIR = DirManager(output_dir=OUTPUT_DIR, session_id="abc")
|
DIR = DirManager(output_dir=OUTPUT_DIR, session_id="abc")
|
||||||
all_files = [f.name for f in DIR.STATUS.rglob("*")]
|
all_files = [f.name for f in DIR.STATUS.rglob("*")]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue