@@ -86,17 +86,23 @@ def validate_node_ttls(session):
86
86
assert result .single ()["node_count" ] == 0
87
87
88
88
89
+ PIPELINE_TESTS = [
90
+ ("airports" , [validate_airports , valiudate_airport_country ]),
91
+ ("fifa" , [validate_fifa_player_count , validate_fifa_mo_club ]),
92
+ ]
93
+
94
+ TTL_TESTS = [
95
+ ("relationship-ttlss" , [validate_relationship_ttls ]),
96
+ ("node-ttls" , [validate_node_ttls ]),
97
+ ]
98
+
99
+
89
100
@pytest .mark .asyncio
90
101
@pytest .mark .e2e
91
102
@pytest .mark .parametrize ("neo4j_version" , TESTED_NEO4J_VERSIONS )
92
103
@pytest .mark .parametrize (
93
104
"pipeline_name,validations" ,
94
- [
95
- ("airports" , [validate_airports , valiudate_airport_country ]),
96
- ("fifa" , [validate_fifa_player_count , validate_fifa_mo_club ]),
97
- ("relatiobship-ttls" , [validate_relationship_ttls ]),
98
- ("node-ttls" , [validate_node_ttls ]),
99
- ],
105
+ PIPELINE_TESTS ,
100
106
)
101
107
async def test_neo4j_pipeline (
102
108
project , neo4j_container , pipeline_name , validations , neo4j_version
@@ -116,3 +122,25 @@ async def test_neo4j_pipeline(
116
122
117
123
for validator in validations :
118
124
validator (session )
125
+
126
+
127
+ @pytest .mark .asyncio
128
+ @pytest .mark .e2e
129
+ @pytest .mark .parametrize ("neo4j_version" , TESTED_NEO4J_VERSIONS )
130
+ async def test_neo4j_ttls (project , neo4j_container , neo4j_version ):
131
+ with neo4j_container (
132
+ neo4j_version
133
+ ) as neo4j_container , neo4j_container .get_driver () as driver , driver .session () as session :
134
+ target = project .get_target_by_name ("my-neo4j-db" )
135
+
136
+ for pipeline_name , validations in PIPELINE_TESTS + TTL_TESTS :
137
+ await project .run (
138
+ RunRequest (
139
+ pipeline_name ,
140
+ PipelineInitializationArguments (extra_steps = [target .make_writer ()]),
141
+ PipelineProgressReporter (),
142
+ )
143
+ )
144
+
145
+ for validator in validations :
146
+ validator (session )
0 commit comments