Skip to content

Commit 8dec4c5

Browse files
committed
Add test case
1 parent 64bfcc3 commit 8dec4c5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

internal/planner/planner_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,18 @@ func TestGetVersionConfig_ProgressiveRolloutOverTime(t *testing.T) {
11861186
expectRamps: []float32{10, 25, 50, 100},
11871187
expectRolloutDuration: 30*time.Second + 3*time.Second,
11881188
},
1189+
"pick up ramping from first step if current ramp less than all steps": {
1190+
steps: []temporaliov1alpha1.RolloutStep{
1191+
rolloutStep(10, 10*time.Second),
1192+
rolloutStep(25, 10*time.Second),
1193+
rolloutStep(50, 10*time.Second),
1194+
},
1195+
reconcileFreq: time.Second,
1196+
// Simulate a ramp value set manually via Temporal CLI
1197+
initialRamp: float32Ptr(1),
1198+
expectRamps: []float32{10, 25, 50, 100},
1199+
expectRolloutDuration: 30*time.Second + 3*time.Second,
1200+
},
11891201
}
11901202

11911203
for name, tc := range testCases {

0 commit comments

Comments
 (0)