@@ -712,9 +712,9 @@ public function testRun()
712712        );
713713        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
714714        $ this assertEquals (
715-             [ ' clean '  => [ ' bypass '  =>  1 ]] ,
715+             null ,
716716            $ originCountItem
717-             'The origin count for clean should be 1  ' 
717+             'The origin count for clean should be null  ' 
718718        );
719719
720720        // Test 3: bouncing URI 
@@ -739,9 +739,9 @@ public function testRun()
739739        $ this assertEquals (true , $ bouncerrun (), 'Should bounce uri ' );
740740        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
741741        $ this assertEquals (
742-             ['clean '  => ['bypass '  => 2 ]],
742+             ['clean '  => ['bypass '  => 1 ]],
743743            $ originCountItem
744-             'The origin count for clean should be 2  ' 
744+             'The origin count for clean should be 1  ' 
745745        );
746746
747747        // Test 4:  not bouncing URI if disabled 
@@ -768,9 +768,9 @@ public function testRun()
768768        $ this assertEquals (false , $ bouncerrun (), 'Should not bounce if disabled ' );
769769        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
770770        $ this assertEquals (
771-             ['clean '  => ['bypass '  => 3 ]],
771+             ['clean '  => ['bypass '  => 1 ]],
772772            $ originCountItem
773-             'The origin count for clean should be 3  ' 
773+             'The origin count for clean should still  be 1 as we did not bounce at all due to config  ' 
774774        );
775775
776776        PHPUnitUtil::assertRegExp (
@@ -830,9 +830,9 @@ public function testRun()
830830        );
831831        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
832832        $ this assertEquals (
833-             ['clean '  => ['bypass '  => 3 ]],
833+             ['clean '  => ['bypass '  => 1 ]],
834834            $ originCountItem
835-             'The origin count for clean should be still 3  ' 
835+             'The origin count for clean should be still 1  ' 
836836        );
837837
838838        // Test 6: NOT throw error if config says so 
@@ -871,9 +871,9 @@ public function testRun()
871871        }
872872        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
873873        $ this assertEquals (
874-             ['clean '  => ['bypass '  => 3 ]],
874+             ['clean '  => ['bypass '  => 1 ]],
875875            $ originCountItem
876-             'The origin count for clean should be still 3  ' 
876+             'The origin count for clean should be still 1  ' 
877877        );
878878
879879        $ this assertEquals ('' , $ error'Should not throw error ' );
@@ -919,9 +919,9 @@ public function testRun()
919919        );
920920        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
921921        $ this assertEquals (
922-             ['clean '  => ['bypass '  => 4 ]],
922+             ['clean '  => ['bypass '  => 2 ]],
923923            $ originCountItem
924-             'The origin count for clean should be 4  ' 
924+             'The origin count for clean should be 2  ' 
925925        );
926926
927927        // Test 8 : forced X-Forwarded-for usage 
@@ -959,9 +959,9 @@ public function testRun()
959959        );
960960        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
961961        $ this assertEquals (
962-             ['clean '  => ['bypass '  => 5 ]],
962+             ['clean '  => ['bypass '  => 3 ]],
963963            $ originCountItem
964-             'The origin count for clean should be 5  ' 
964+             'The origin count for clean should be 3  ' 
965965        );
966966
967967        // Test 9 non-authorized 
@@ -995,9 +995,9 @@ public function testRun()
995995        );
996996        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
997997        $ this assertEquals (
998-             ['clean '  => ['bypass '  => 6 ]],
998+             ['clean '  => ['bypass '  => 4 ]],
999999            $ originCountItem
1000-             'The origin count for clean should be 6  ' 
1000+             'The origin count for clean should be 4  ' 
10011001        );
10021002
10031003        // Test 10 authorized 
@@ -1030,20 +1030,20 @@ public function testRun()
10301030        );
10311031        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
10321032        $ this assertEquals (
1033-             ['clean '  => ['bypass '  => 7 ]],
1033+             ['clean '  => ['bypass '  => 5 ]],
10341034            $ originCountItem
1035-             'The origin count for clean should be 7  ' 
1035+             'The origin count for clean should be 5  ' 
10361036        );
10371037        // Test 11: push metrics 
10381038        $ result$ bouncerpushUsageMetrics (self ::BOUNCER_NAME , self ::BOUNCER_VERSION , self ::BOUNCER_TYPE );
10391039        $ this assertEquals (
10401040            [
10411041                'name '  => 'processed ' ,
1042-                 'value '  => 7 ,
1042+                 'value '  => 5 ,
10431043                'unit '  => 'request ' ,
10441044            ],
10451045            $ result'remediation_components ' ][0 ]['metrics ' ][0 ]['items ' ][0 ],
1046-             'Should have pushed metrics ' 
1046+             'Should have pushed 5 processed  metrics ' 
10471047        );
10481048        $ originCountItem$ cachegetItem (AbstractCache::ORIGINS_COUNT )->get ();
10491049        $ this assertEquals (
0 commit comments