apache-airflow: correctly run pytest checks
Previously the whole checkPhase was overridden with the preparatory test setup commands, which prevented pytestCheckHook from having an effect. Fixed to do the preparatory work in preCheck.
This commit is contained in:
@@ -238,12 +238,17 @@ buildPythonPackage rec {
|
||||
"--prefix PYTHONPATH : $PYTHONPATH"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
|
||||
# Needed for pythonImportsCheck below
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"airflow"
|
||||
] ++ providerImports;
|
||||
|
||||
checkPhase = ''
|
||||
export HOME=$(mktemp -d)
|
||||
preCheck = ''
|
||||
export AIRFLOW_HOME=$HOME
|
||||
export AIRFLOW__CORE__UNIT_TEST_MODE=True
|
||||
export AIRFLOW_DB="$HOME/airflow.db"
|
||||
@@ -262,10 +267,6 @@ buildPythonPackage rec {
|
||||
"bash_operator_kill" # psutil.AccessDenied
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
|
||||
'';
|
||||
|
||||
# Updates yarn.lock and package.json
|
||||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
|
||||
Reference in New Issue
Block a user