mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-04-27 09:10:12 -04:00
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: https://github.com/kubernetes/features/issues/95 https://github.com/kubernetes/kubernetes/issues/40841#issue-204769102 **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 ``` |
||
|---|---|---|
| .. | ||
| cmd | ||
| metricsutil | ||
| resource | ||
| testing | ||
| apply.go | ||
| autoscale.go | ||
| bash_comp_utils.go | ||
| BUILD | ||
| cluster.go | ||
| cluster_test.go | ||
| clusterrolebinding.go | ||
| configmap.go | ||
| configmap_test.go | ||
| deployment.go | ||
| deployment_test.go | ||
| doc.go | ||
| explain.go | ||
| generate.go | ||
| generate_test.go | ||
| history.go | ||
| interfaces.go | ||
| kubectl.go | ||
| kubectl_test.go | ||
| namespace.go | ||
| namespace_test.go | ||
| OWNERS | ||
| pdb.go | ||
| proxy_server.go | ||
| proxy_server_test.go | ||
| quota.go | ||
| quota_test.go | ||
| resource_filter.go | ||
| rolebinding.go | ||
| rollback.go | ||
| rolling_updater.go | ||
| rolling_updater_test.go | ||
| rollout_status.go | ||
| rollout_status_test.go | ||
| run.go | ||
| run_test.go | ||
| scale.go | ||
| scale_test.go | ||
| secret.go | ||
| secret_for_docker_registry.go | ||
| secret_for_docker_registry_test.go | ||
| secret_for_tls.go | ||
| secret_for_tls_test.go | ||
| secret_test.go | ||
| service.go | ||
| service_basic.go | ||
| service_basic_test.go | ||
| service_test.go | ||
| serviceaccount.go | ||
| serviceaccount_test.go | ||
| sorting_printer.go | ||
| sorting_printer_test.go | ||
| stop.go | ||
| stop_test.go | ||
| versioned_client.go | ||