Merge pull request #5033 from Affan-7/e2e-test

Add combined case 3 in the lazy activation policy tests
This commit is contained in:
karmada-bot 2024-06-14 11:51:41 +08:00 committed by GitHub
commit 86d1ac7aaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 0 deletions

View File

@ -158,6 +158,25 @@ var _ = ginkgo.Describe("Lazy activation policy testing", func() {
})
})
// Combined Case 3 (Policy preemption)
// refer: https://github.com/karmada-io/karmada/blob/release-1.9/docs/proposals/scheduling/activation-preference/lazy-activation-preference.md#combined-case-3-policy-preemption
ginkgo.It("Combined Case 3 (Policy preemption)", func() {
ginkgo.By("step 1: deployment propagate success when policy created before it", func() {
waitDeploymentPresentOnCluster(originalCluster, namespace, deploymentName)
})
ginkgo.By("step 2: create PP2 (match nginx, cluster=member2, not lazy, priority=2, preemption=true)", func() {
policyHigherPriority.Spec.ActivationPreference = "" // remove lazy activationPreference field
framework.CreatePropagationPolicy(karmadaClient, policyHigherPriority)
waitDeploymentPresentOnCluster(modifiedCluster, namespace, deploymentName)
})
ginkgo.By("step 3: clean up", func() {
framework.RemovePropagationPolicyIfExist(karmadaClient, namespace, policyHigherPriorityName)
})
})
// Combined Case 4 (Policy preemption)
// refer: https://github.com/karmada-io/karmada/blob/release-1.9/docs/proposals/scheduling/activation-preference/lazy-activation-preference.md#combined-case-4-policy-preemption
ginkgo.It("Policy preemption", func() {