Skip to content

Commit

Permalink
Merge pull request #5033 from Affan-7/e2e-test
Browse files Browse the repository at this point in the history
Add combined case 3 in the lazy activation policy tests
  • Loading branch information
karmada-bot authored Jun 14, 2024
2 parents 8d5aac4 + 8f1b112 commit 86d1ac7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/e2e/lazy_activation_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 86d1ac7

Please sign in to comment.