From 09736be293ace065d8f6e78ce04c1920be5508f5 Mon Sep 17 00:00:00 2001
From: Gede Wahyu <tokekbesi@gmail.com>
Date: Wed, 5 Dec 2018 15:21:09 +0700
Subject: [PATCH] When firing, newReplicas should be greater than
 currentReplicas

Signed-off-by: Gede Wahyu <tokekbesi@gmail.com>
---
 gateway/handlers/alerthandler_test.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gateway/handlers/alerthandler_test.go b/gateway/handlers/alerthandler_test.go
index 561aca2d..0d89e3a9 100644
--- a/gateway/handlers/alerthandler_test.go
+++ b/gateway/handlers/alerthandler_test.go
@@ -105,7 +105,7 @@ func TestScaledUpFrom1(t *testing.T) {
 	maxReplicas := uint64(5)
 	scalingFactor := uint64(30)
 	newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, scaling.DefaultMinReplicas, scalingFactor)
-	if newReplicas == currentReplicas {
+	if newReplicas <= currentReplicas {
 		t.Log("Expected newReplicas > currentReplica")
 		t.Fail()
 	}
@@ -116,7 +116,7 @@ func TestScaledUpWithSmallParam(t *testing.T) {
 	maxReplicas := uint64(4)
 	scalingFactor := uint64(1)
 	newReplicas := CalculateReplicas("firing", currentReplicas, maxReplicas, scaling.DefaultMinReplicas, scalingFactor)
-	if newReplicas == currentReplicas {
+	if newReplicas <= currentReplicas {
 		t.Log("Expected newReplicas > currentReplica")
 		t.Fail()
 	}
-- 
GitLab