anisayakmitra-in opened a new pull request, #75541:
URL: https://github.com/apache/airflow/pull/75541

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   ## Description
   
   Related to #72265 (Unit test coverage for `providers/cncf/kubernetes`).
   
   This PR adds comprehensive unit test coverage for `exceptions.py` and 
`kube_config.py` in `providers/cncf/kubernetes`:
   1. `airflow.providers.cncf.kubernetes.test_exceptions`:
      - Verifies class inheritance from `AirflowException` for 
`PodMutationHookException`, `PodReconciliationError`, `KubernetesApiError`, and 
`KubernetesApiPermissionError`.
      - Verifies message retention and instantiation across all exception types.
      - Verifies catching each custom error under the base `AirflowException` 
handler.
   2. `airflow.providers.cncf.kubernetes.test_kube_config`:
      - Verifies full configuration parsing with team-aware `ExecutorConf` 
(dags folder, parallelism, template files, batch sizes, namespace lists, fatal 
container state reasons).
      - Verifies `kube_image` assembly and fallback to `None` when repository 
or tag are unset.
      - Verifies parsing of JSON dictionary configurations 
(`kube_client_request_args`, `delete_option_kwargs`) including conversion of 
list timeouts to tuples.
      - Verifies validation errors (`AirflowConfigException`) when JSON 
dictionary properties receive invalid types.
      - Verifies fallback to global `conf` when `executor_conf` is omitted.
   3. Updated `airflow-core/tests/unit/always/test_project_structure.py`:
      - Removed `test_exceptions.py` and `test_kube_config.py` from 
`OVERLOOKED_TESTS`.
   
   All 18 new test cases and assertions pass locally with zero regressions.
   


-- 
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