Test scaled up from 1

Signed-off-by: Gede Wahyu <tokekbesi@gmail.com>
This commit is contained in:
Gede Wahyu
2018-11-15 18:13:04 +07:00
committed by Alex Ellis
parent ea40055c60
commit 058d1e481a

View File

@ -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()
}
}