-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some unit tests for apply on TPR #40841
Comments
@ahakanbaba This is for you. |
Thanks I will follow up with this. |
@ahakanbaba You should be good to go. #40666 merged. |
Thanks |
@GnawNom This is the issue we can collaborate on. |
@GnawNom I will work on |
The test in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. The apply operation expects a last-modified-configuration annotation. That is written verbatim in the test/fixture file. References kubernetes#40841
The tests in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. In PATCH request rount-tripper we check that the kubectl apply implementation worked as expected. References kubernetes#40841
The tests in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. In PATCH request rount-tripper we check that the kubectl apply implementation worked as expected. References kubernetes#40841
The tests in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. In PATCH request rount-tripper we check that the kubectl apply implementation worked as expected. References kubernetes#40841
Automatic merge from submit-queue (batch tested with PRs 41937, 41151, 42092, 40269, 42135) Add a unit test for idempotent applys to the TPR entries. The test in apply_test follows the general pattern of other tests. We load from a file in test/fixtures and mock the API server in the function closure in the HttpClient call. The apply operation expects a last-modified-configuration annotation. That is written verbatim in the test/fixture file. References #40841 **What this PR does / why we need it**: Adds one unit test for TPR's using applies. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # References: kubernetes/enhancements#95 #40841 (comment) **Special notes for your reviewer**: I am not super proud of the tpr-entry name. But I feel like we need to call the two objects differently. The one which has Kind:ThirdPartyResource and the one has Kind:Foo. Is the name "ThirdPartyResource" used interchangeably for both ? I used tpr-entry for the Kind:Foo object. Also I !assume! this is testing an idempotent apply because the last-applied-configuration annotation is the same as the object itself. This is the state I see in the logs of kubectl if I do a proper idempotent apply of a third party resource entry. I guess I will know more once I start playing around with apply command that change TPR objects. **Release note**: ```release-note ```
/sig apps |
/sig api-machinery |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
These exist now: kubernetes/hack/make-rules/test-cmd-util.sh Lines 1731 to 1852 in bc0e706
/close |
Copied from #40666 (comment)
Initial attempt: #40775
We should at least have the following unit tests:
The text was updated successfully, but these errors were encountered: