SameerMesiah97 commented on code in PR #72449:
URL: https://github.com/apache/airflow/pull/72449#discussion_r3917341828


##########
providers/amazon/tests/unit/amazon/aws/sensors/test_batch.py:
##########
@@ -92,6 +92,28 @@ def test_execute_in_deferrable_mode(self, 
deferrable_batch_sensor: BatchSensor):
             deferrable_batch_sensor.execute({})
         assert isinstance(exc.value.trigger, BatchJobTrigger), "Trigger is not 
a BatchJobTrigger"
 
+    def test_execute_in_deferrable_mode_passes_aws_configs(self):
+        """Asserts that verify and botocore_config survive into the serialized 
trigger payload."""
+        sensor = BatchSensor(
+            task_id="task",
+            job_id=JOB_ID,
+            region_name=AWS_REGION,
+            verify="/custom/ca_bundle.pem",
+            botocore_config={"read_timeout": 45},
+            deferrable=True,
+        )
+
+        with pytest.raises(TaskDeferred) as exc:
+            sensor.execute({})
+
+        trigger = exc.value.trigger
+        assert isinstance(trigger, BatchJobTrigger)
+
+        _, kwargs = trigger.serialize()
+        assert kwargs.get("region_name") == AWS_REGION
+        assert kwargs.get("verify") == "/custom/ca_bundle.pem"
+        assert kwargs.get("botocore_config") == {"read_timeout": 45}

Review Comment:
    I dont think it is necessary to cover `region_name` as my understanding is 
that the intention of this PR is to forward the 2 additional arguments i.e. 
`verify` and `botocore_config`. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to