apache-airflow: use pytestCheckHook
This commit is contained in:
parent
1d1d332bb2
commit
ec05219e40
1 changed files with 7 additions and 5 deletions
|
@ -58,7 +58,7 @@
|
||||||
, termcolor
|
, termcolor
|
||||||
, unicodecsv
|
, unicodecsv
|
||||||
, werkzeug
|
, werkzeug
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, freezegun
|
, freezegun
|
||||||
, mkYarnPackage
|
, mkYarnPackage
|
||||||
}:
|
}:
|
||||||
|
@ -171,7 +171,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
freezegun
|
freezegun
|
||||||
pytest
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
INSTALL_PROVIDERS_FROM_SOURCES = "true";
|
INSTALL_PROVIDERS_FROM_SOURCES = "true";
|
||||||
|
@ -204,7 +204,7 @@ buildPythonPackage rec {
|
||||||
# allow for gunicorn processes to have access to python packages
|
# allow for gunicorn processes to have access to python packages
|
||||||
makeWrapperArgs = [ "--prefix PYTHONPATH : $PYTHONPATH" ];
|
makeWrapperArgs = [ "--prefix PYTHONPATH : $PYTHONPATH" ];
|
||||||
|
|
||||||
checkPhase = ''
|
preCheck = ''
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
export AIRFLOW_HOME=$HOME
|
export AIRFLOW_HOME=$HOME
|
||||||
export AIRFLOW__CORE__UNIT_TEST_MODE=True
|
export AIRFLOW__CORE__UNIT_TEST_MODE=True
|
||||||
|
@ -214,10 +214,12 @@ buildPythonPackage rec {
|
||||||
airflow version
|
airflow version
|
||||||
airflow db init
|
airflow db init
|
||||||
airflow db reset -y
|
airflow db reset -y
|
||||||
|
|
||||||
pytest tests/core/test_core.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
"tests/core/test_core.py"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
|
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue