mirror of
https://github.com/openfaas/faas.git
synced 2025-06-29 02:03:24 +00:00
Round up value of newReplicas
Signed-off-by: Gede Wahyu <tokekbesi@gmail.com>
This commit is contained in:
@ -110,3 +110,14 @@ func TestScaledUpFrom1(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestScaledUpWithSmallParam(t *testing.T) {
|
||||
currentReplicas := uint64(1)
|
||||
maxReplicas := uint64(4)
|
||||
scalingFactor := uint64(1)
|
||||
newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, scaling.DefaultMinReplicas, scalingFactor)
|
||||
if newReplicas == currentReplicas {
|
||||
t.Log("Expected newReplicas > currentReplica")
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user