Skip to content

Conversation

@scholzj
Copy link
Member

@scholzj scholzj commented Oct 26, 2025

Type of change

  • Task

Description

This PR adds some tests using the v1 API to the api module. The main focus is testing the v1 API support and the required fields / sections.

Checklist

  • Write tests
  • Make sure all tests pass

@scholzj scholzj added this to the 0.49.0 milestone Oct 26, 2025
@scholzj scholzj requested a review from a team October 26, 2025 15:45
@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.77%. Comparing base (a030653) to head (931eb13).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #12075   +/-   ##
=========================================
  Coverage     74.77%   74.77%           
- Complexity     6611     6614    +3     
=========================================
  Files           376      376           
  Lines         25325    25325           
  Branches       3389     3389           
=========================================
+ Hits          18937    18938    +1     
  Misses         5000     5000           
+ Partials       1388     1387    -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of comments but I guess they are valid for other custom resources on which we are going to remove some fields in v1. Looking at proposal #113, is it a goal to cover all of them in this PR?

@scholzj
Copy link
Member Author

scholzj commented Oct 27, 2025

Looking at proposal #113, is it a goal to cover all of them in this PR?

No, it is not a goal of this PR to cover everything from there.

@ppatierno
Copy link
Member

No, it is not a goal of this PR to cover everything from there.

Just for my understanding, what's the rationale behind picking some of them?

@scholzj
Copy link
Member Author

scholzj commented Oct 27, 2025

No, it is not a goal of this PR to cover everything from there.

Just for my understanding, what's the rationale behind picking some of them?

Well, I wanted to:

  • Have some tests with a valid resource
  • Try to focus on those which will be relevant forever (such as the spec being required)
  • Try to focus on the most important ones (e.g. the deprecated authentication and authorization types are IMHO more important then the Jaeger tracing which actually doesn't do anything for a long time)

As I said, these tests can do only a limited amount of things. Basically just required fields and typed objects. For things such as the removed fields, you would IMHO need to write some tests based on kubectl. But we had those in the past and removed them after being notoriously unreliable and heavily dependent on the exact kubectl version used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants