Repository navigation
Add dedicated tests for cncf.kubernetes secret and k8s_model modules - #73751
Merged
shahar1 merged 3 commits intoSep 26, 2026
Merged
Conversation
The Secret tests lived under a models/ test package that has no matching source package, so the project-structure check could not see them and both modules stayed on the OVERLOOKED_TESTS allowlist. Placing the tests where the check expects them lets the allowlist shrink, and covers constructor validation, equality semantics and append_to_pod chaining, which were previously untested.
…Delete providers/cncf/kubernetes/tests/unit/cncf/kubernetes/models directory
KarthikMohankumar
requested review from
hussein-awala,
jedcunningham and
jscheffl
as code owners
September 26, 2026 08:22
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
shahar1
approved these changes
Sep 26, 2026
Contributor
|
Welcome to Apache Airflow and thanks for your contribution! |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
1 task done
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
secret.pyandk8s_model.pyin thecncf.kubernetesprovider were both on theOVERLOOKED_TESTSallowlist intest_project_structure.py.Secretalready had tests, but they lived intests/unit/cncf/kubernetes/models/test_secret.py. There is nomodelspackage on the source side, so the structure check never matched them tosecret.py. This PR:tests/unit/cncf/kubernetes/test_secret.py, next to where the source lives, and drops the now-emptymodels/test packagedeploy_type,keywithoutdeploy_target), uppercasing of env deploy targets,__eq__/__hash__/__repr__, and a check thatattach_to_poddoesn't mutate the input podtest_k8s_model.pycoveringappend_to_pod:Noneand empty lists return the pod unchanged, and each object receives the previous object's resultOVERLOOKED_TESTSTests only. No change to runtime behaviour.
related: #35442
Checks run locally:
uv run --project providers/cncf/kubernetes pytest tests/unit/cncf/kubernetes/test_secret.py tests/unit/cncf/kubernetes/test_k8s_model.py: 19 passedtest_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests: passedprek run --stage pre-commiton the changed files (ruff, ruff-format, mypy-devel-common and the other applicable hooks): passed.ast-grepwas skipped locally because it could not download its Node runtime.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines