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

   <!--
    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 (Part of missing unit tests for 
`providers/cncf/kubernetes`).
   
   This PR adds comprehensive unit test coverage for the remaining uncovered 
modules in `providers/cncf/kubernetes`:
   1. `airflow.providers.cncf.kubernetes.python_kubernetes_script`:
      - `_balance_parens`: verifies parenthesis matching with nested constructs.
      - `remove_task_decorator`: verifies stripping of `@task.kubernetes` with 
and without arguments, nested arguments, and `@setup` / `@teardown` decorators.
      - `write_python_script`: verifies Jinja rendering under standard template 
environment, `NativeEnvironment`, and `StrictUndefined` missing variable error 
handling.
   2. `airflow.providers.cncf.kubernetes.utils.delete_from`:
      - `FailToDeleteError`: verifies aggregation and formatted server error 
string generation.
      - `_delete_from_yaml_single_item`: verifies resource deletion on 
namespaced and non-namespaced Kubernetes resources.
      - `delete_from_yaml`: verifies parsing and deletion across multi-document 
YAML manifests and API class name derivation.
      - `delete_from_dict`: verifies recursive handling of `List` kinds and 
collection of multiple `ApiException` failures.
   3. Updated `airflow-core/tests/unit/always/test_project_structure.py`:
      - Removed both entries from `OVERLOOKED_TESTS`.
   
   All 16 new test cases pass locally.
   


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