diff --git a/gateway/handlers/alerthandler_test.go b/gateway/handlers/alerthandler_test.go index 8be3a2c604e41c50d618a0198b228c6c6a7de2d8..bb4669563c651c72325408faeab14400461d973d 100644 --- a/gateway/handlers/alerthandler_test.go +++ b/gateway/handlers/alerthandler_test.go @@ -99,3 +99,14 @@ func TestBackingOff(t *testing.T) { t.Fail() } } + +func TestScaledUpFrom1(t *testing.T) { + currentReplicas := uint64(1) + maxReplicas := uint64(5) + scalingFactor := uint64(30) + newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, DefaultMinReplicas, scalingFactor) + if newReplicas == currentReplicas { + t.Log("Expected newReplicas > currentReplica") + t.Fail() + } +}