Skip to content

Add tests for kubernetes versions #7035

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Dec 23, 2024
Merged

Add tests for kubernetes versions #7035

merged 5 commits into from
Dec 23, 2024

Conversation

pdabelf5
Copy link
Collaborator

@pdabelf5 pdabelf5 commented Dec 20, 2024

Proposed changes

  • Add unit tests for k8s version validation
  • Switch to returning an error from validateKubernetesVersionInfo() to make the function testable.

This is a similar approach to #5110, but in smaller changes.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pdabelf5 pdabelf5 requested a review from a team as a code owner December 20, 2024 11:13
@github-actions github-actions bot added the go Pull requests that update Go code label Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 52.76%. Comparing base (2e0daa1) to head (5a9ec4e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/nginx-ingress/main.go 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7035      +/-   ##
==========================================
+ Coverage   52.73%   52.76%   +0.03%     
==========================================
  Files          89       89              
  Lines       20824    20827       +3     
==========================================
+ Hits        10981    10990       +9     
+ Misses       9389     9380       -9     
- Partials      454      457       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jjngx jjngx merged commit 93eec0d into main Dec 23, 2024
79 checks passed
@jjngx jjngx deleted the k8s-version-tests branch December 23, 2024 09:20
@pdabelf5 pdabelf5 added chore Pull requests for routine tasks and removed go Pull requests that update Go code labels Apr 4, 2025
@pdabelf5 pdabelf5 changed the title add tests for kubernetes versions Add tests for kubernetes versions Apr 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
chore Pull requests for routine tasks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants