mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Add progressive promotion test
This commit is contained in:
@@ -134,8 +134,9 @@ func TestScheduler_DeploymentSkipAnalysis(t *testing.T) {
|
||||
func TestScheduler_DeploymentAnalysisPhases(t *testing.T) {
|
||||
cd := newDeploymentTestCanary()
|
||||
cd.Spec.Analysis = &flaggerv1.CanaryAnalysis{
|
||||
Interval: "1m",
|
||||
StepWeight: 100,
|
||||
Interval: "1m",
|
||||
StepWeight: 100,
|
||||
StepWeightPromotion: 50,
|
||||
}
|
||||
mocks := newDeploymentFixture(cd)
|
||||
|
||||
@@ -163,7 +164,11 @@ func TestScheduler_DeploymentAnalysisPhases(t *testing.T) {
|
||||
mocks.ctrl.advanceCanary("podinfo", "default")
|
||||
require.NoError(t, assertPhase(mocks.flaggerClient, "podinfo", flaggerv1.CanaryPhaseProgressing))
|
||||
|
||||
// promoting
|
||||
// start promotion
|
||||
mocks.ctrl.advanceCanary("podinfo", "default")
|
||||
require.NoError(t, assertPhase(mocks.flaggerClient, "podinfo", flaggerv1.CanaryPhasePromoting))
|
||||
|
||||
// end promotion
|
||||
mocks.ctrl.advanceCanary("podinfo", "default")
|
||||
require.NoError(t, assertPhase(mocks.flaggerClient, "podinfo", flaggerv1.CanaryPhasePromoting))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user