From d2a27f4eab5d82ca8c75684881c8c0a3d9c4ea39 Mon Sep 17 00:00:00 2001 From: Julien Loizelet Date: Thu, 10 Oct 2024 18:56:15 +0900 Subject: [PATCH] test(*): Use a different Bad ip for AppSec We try to avoid race condition --- tests/Constants.php | 1 + tests/Integration/BouncerTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Constants.php b/tests/Constants.php index f1f3819..4d64377 100644 --- a/tests/Constants.php +++ b/tests/Constants.php @@ -43,6 +43,7 @@ class Constants public const APPSEC_CONNECT_TIMEOUT_MS = 300; public const BAD_IP = '1.2.3.4'; + public const BAD_IP_APPSEC = '1.2.3.5'; public const IP_RANGE = '24'; public const JAPAN = 'JP'; } diff --git a/tests/Integration/BouncerTest.php b/tests/Integration/BouncerTest.php index e5fca48..4f2dc28 100644 --- a/tests/Integration/BouncerTest.php +++ b/tests/Integration/BouncerTest.php @@ -202,7 +202,7 @@ public function testAppSecDecision($requestHandler) $headers = [ 'X-Crowdsec-Appsec-Api-Key' => $bouncerKey, - 'X-Crowdsec-Appsec-Ip' => TestConstants::BAD_IP, + 'X-Crowdsec-Appsec-Ip' => TestConstants::BAD_IP_APPSEC, 'X-Crowdsec-Appsec-Host' => 'example.com', 'X-Crowdsec-Appsec-User-Agent' => 'Mozilla/5.0', 'X-Crowdsec-Appsec-Verb' => 'GET',