File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -571,6 +571,14 @@ configuration = airflow_client.client.Configuration(
571
571
)
572
572
```
573
573
574
+ * Run scheduler (or dag file processor you have setup with standalone dag file processor) for few parsing
575
+ loops (you can pass --num-runs parameter to it or keep it running in the background). The script relies
576
+ on example DAGs being serialized to the DB and this only
577
+ happens when scheduler runs with `` core/load_examples `` set to True.
578
+
579
+ * Run webserver - reachable at the host/port for the test script you want to run. Make sure it had enough
580
+ time to initialize.
581
+
574
582
Run ` python test_python_client.py ` and you should see colored output showing attempts to connect and status.
575
583
576
584
Original file line number Diff line number Diff line change @@ -65,12 +65,11 @@ Homepage = "https://airflow.apache.org/"
65
65
[tool .hatch .envs .test ]
66
66
dependencies = [
67
67
" pytest-cov>=2.8.1" ,
68
- " python_dateutil >= 2.5.3" ,
69
68
" urllib3 >= 1.25.3" ,
70
69
]
71
70
72
71
[tool .hatch .envs .test .scripts ]
73
- run-coverage = " pytest --cov-config=pyproject.toml --cov=airflow_client test --color=yes "
72
+ run-coverage = " pytest test"
74
73
run = " run-coverage --no-cov"
75
74
76
75
[[tool .hatch .envs .test .matrix ]]
@@ -103,3 +102,18 @@ artifacts = [
103
102
include = [
104
103
" /airflow_client" ,
105
104
]
105
+
106
+ [tool .pytest .ini_options ]
107
+ # make sure that pytest.ini is not read from pyproject.toml in paraent directories
108
+ addopts = " --color=yes --cov-config=pyproject.toml --cov=airflow_client"
109
+ norecursedirs = [
110
+ ]
111
+ log_level = " INFO"
112
+ filterwarnings = [
113
+ ]
114
+ python_files = [
115
+ " test_*.py" ,
116
+ ]
117
+ testpaths = [
118
+ " test" ,
119
+ ]
Original file line number Diff line number Diff line change 26
26
27
27
from __future__ import annotations
28
28
29
+ import sys
29
30
import uuid
30
31
31
32
import airflow_client .client
124
125
125
126
if errors :
126
127
print ("\n [red]There were errors while running the script - see above for details" )
128
+ sys .exit (1 )
127
129
else :
128
130
print ("\n [green]Everything went well" )
You can’t perform that action at this time.
0 commit comments