@@ -147,7 +147,7 @@ def test_parse_spec_output_no_spec(self, publish_context):
147
147
148
148
149
149
STEPS_TO_PATCH = [
150
- (publish_pipeline , "QaChecks " ),
150
+ (publish_pipeline , "MetadataValidation " ),
151
151
(publish_pipeline , "MetadataUpload" ),
152
152
(publish_pipeline , "CheckConnectorImageDoesNotExist" ),
153
153
(publish_pipeline , "UploadSpecToCache" ),
@@ -159,29 +159,29 @@ def test_parse_spec_output_no_spec(self, publish_context):
159
159
160
160
161
161
@pytest .mark .parametrize ("pre_release" , [True , False ])
162
- async def test_run_connector_publish_pipeline_when_failed_qa_checks (mocker , pre_release ):
163
- """We validate that no other steps are called if the qa checks step fails."""
162
+ async def test_run_connector_publish_pipeline_when_failed_validation (mocker , pre_release ):
163
+ """We validate that no other steps are called if the metadata validation step fails."""
164
164
for module , to_mock in STEPS_TO_PATCH :
165
165
mocker .patch .object (module , to_mock , return_value = mocker .AsyncMock ())
166
166
167
- run_qa_checks = publish_pipeline .QaChecks .return_value .run
168
- run_qa_checks .return_value = mocker .Mock (status = StepStatus .FAILURE )
167
+ run_metadata_validation = publish_pipeline .MetadataValidation .return_value .run
168
+ run_metadata_validation .return_value = mocker .Mock (status = StepStatus .FAILURE )
169
169
170
170
context = mocker .MagicMock (pre_release = pre_release )
171
171
semaphore = anyio .Semaphore (1 )
172
172
report = await publish_pipeline .run_connector_publish_pipeline (context , semaphore )
173
- run_qa_checks .assert_called_once ()
173
+ run_metadata_validation .assert_called_once ()
174
174
175
175
# Check that nothing else is called
176
176
for module , to_mock in STEPS_TO_PATCH :
177
- if to_mock != "QaChecks " :
177
+ if to_mock != "MetadataValidation " :
178
178
getattr (module , to_mock ).return_value .run .assert_not_called ()
179
179
180
180
assert (
181
181
report .steps_results
182
182
== context .report .steps_results
183
183
== [
184
- run_qa_checks .return_value ,
184
+ run_metadata_validation .return_value ,
185
185
]
186
186
)
187
187
@@ -200,8 +200,8 @@ async def test_run_connector_publish_pipeline_when_image_exists_or_failed(mocker
200
200
for module , to_mock in STEPS_TO_PATCH :
201
201
mocker .patch .object (module , to_mock , return_value = mocker .AsyncMock ())
202
202
203
- run_qa_checks = publish_pipeline .QaChecks .return_value .run
204
- run_qa_checks .return_value = mocker .Mock (status = StepStatus .SUCCESS )
203
+ run_metadata_validation = publish_pipeline .MetadataValidation .return_value .run
204
+ run_metadata_validation .return_value = mocker .Mock (status = StepStatus .SUCCESS )
205
205
206
206
# ensure spec always succeeds
207
207
run_upload_spec_to_cache = publish_pipeline .UploadSpecToCache .return_value .run
@@ -214,12 +214,12 @@ async def test_run_connector_publish_pipeline_when_image_exists_or_failed(mocker
214
214
215
215
semaphore = anyio .Semaphore (1 )
216
216
report = await publish_pipeline .run_connector_publish_pipeline (publish_context , semaphore )
217
- run_qa_checks .assert_called_once ()
217
+ run_metadata_validation .assert_called_once ()
218
218
run_check_connector_image_does_not_exist .assert_called_once ()
219
219
220
220
# Check that nothing else is called
221
221
for module , to_mock in STEPS_TO_PATCH :
222
- if to_mock not in ["QaChecks " , "MetadataUpload" , "CheckConnectorImageDoesNotExist" , "UploadSpecToCache" ]:
222
+ if to_mock not in ["MetadataValidation " , "MetadataUpload" , "CheckConnectorImageDoesNotExist" , "UploadSpecToCache" ]:
223
223
getattr (module , to_mock ).return_value .run .assert_not_called ()
224
224
225
225
if check_image_exists_status is StepStatus .SKIPPED :
@@ -228,7 +228,7 @@ async def test_run_connector_publish_pipeline_when_image_exists_or_failed(mocker
228
228
report .steps_results
229
229
== publish_context .report .steps_results
230
230
== [
231
- run_qa_checks .return_value ,
231
+ run_metadata_validation .return_value ,
232
232
run_check_connector_image_does_not_exist .return_value ,
233
233
run_upload_spec_to_cache .return_value ,
234
234
run_metadata_upload .return_value ,
@@ -241,7 +241,7 @@ async def test_run_connector_publish_pipeline_when_image_exists_or_failed(mocker
241
241
report .steps_results
242
242
== publish_context .report .steps_results
243
243
== [
244
- run_qa_checks .return_value ,
244
+ run_metadata_validation .return_value ,
245
245
run_check_connector_image_does_not_exist .return_value ,
246
246
]
247
247
)
@@ -268,10 +268,12 @@ async def test_run_connector_publish_pipeline_when_image_does_not_exist(
268
268
upload_to_spec_cache_step_status ,
269
269
metadata_upload_step_status ,
270
270
):
271
- """We check that the full pipeline is executed as expected when the connector image does not exist and the qa checks passed."""
271
+ """We check that the full pipeline is executed as expected when the connector image does not exist and the metadata validation passed."""
272
272
for module , to_mock in STEPS_TO_PATCH :
273
273
mocker .patch .object (module , to_mock , return_value = mocker .AsyncMock ())
274
- publish_pipeline .QaChecks .return_value .run .return_value = mocker .Mock (name = "qa_checks_result" , status = StepStatus .SUCCESS )
274
+ publish_pipeline .MetadataValidation .return_value .run .return_value = mocker .Mock (
275
+ name = "metadata_validation_result" , status = StepStatus .SUCCESS
276
+ )
275
277
publish_pipeline .CheckConnectorImageDoesNotExist .return_value .run .return_value = mocker .Mock (
276
278
name = "check_connector_image_does_not_exist_result" , status = StepStatus .SUCCESS
277
279
)
@@ -306,7 +308,7 @@ async def test_run_connector_publish_pipeline_when_image_does_not_exist(
306
308
report = await publish_pipeline .run_connector_publish_pipeline (context , semaphore )
307
309
308
310
steps_to_run = [
309
- publish_pipeline .QaChecks .return_value .run ,
311
+ publish_pipeline .MetadataValidation .return_value .run ,
310
312
publish_pipeline .CheckConnectorImageDoesNotExist .return_value .run ,
311
313
publish_pipeline .steps .run_connector_build ,
312
314
publish_pipeline .PushConnectorImageToRegistry .return_value .run ,
@@ -364,7 +366,7 @@ async def test_run_connector_python_registry_publish_pipeline(
364
366
)
365
367
366
368
for step in [
367
- publish_pipeline .QaChecks ,
369
+ publish_pipeline .MetadataValidation ,
368
370
publish_pipeline .CheckConnectorImageDoesNotExist ,
369
371
publish_pipeline .UploadSpecToCache ,
370
372
publish_pipeline .MetadataUpload ,
0 commit comments