test(batchrelease): add regression for deployment pod-template-hash l…#329
test(batchrelease): add regression for deployment pod-template-hash l…#329Nazihbenbrahim wants to merge 2 commits intoopenkruise:masterfrom
Conversation
…abel (openkruise#308) Signed-off-by: Nazih Ben Brahim <nazihbenbrahim9@gmail.com>
Signed-off-by: Nazih Ben Brahim <nazihbenbrahim9@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #329 +/- ##
=======================================
Coverage 51.38% 51.38%
=======================================
Files 66 66
Lines 8559 8559
=======================================
Hits 4398 4398
Misses 3575 3575
Partials 586 586
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ⅰ. Describe what this PR does
Add a regression unit test to ensure BatchRelease does not get stuck in
Verifyingwhen a Deployment’s PodTemplate already includes thepod-template-hash(apps.DefaultDeploymentUniqueLabelKey) label.The new test (
TestDeploymentPodTemplateHashLabelPatch) verifies:pod-template-hashdiffers from hash without itUpdateRevisioncomputed from the Deployment template matches the ReplicaSet template hash when the label is presentⅡ. Does this pull request fix one issue?
Fixes #308
Ⅲ. Special notes for reviews
go test ./pkg/controller/batchrelease/labelpatch -count=1