From b2bcb7ca2511286e7060347402c8ec44e519b5f7 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Tue, 15 Sep 2026 21:33:20 +0200 Subject: [PATCH] fix(tests): declare the classes the connection report tests use keepiq's phpunit.xml sets beStrictAboutCoverageMetadata and failOnRisky, and CI collects coverage, so a test that runs a class it neither @covers nor @uses is risky and fails the cell. Twelve tests added in #706 ran ConnectionReporter, ConnectionObservations, SiemAuditTrail, SiemSink and SiemQueueItem without declaring them, which kept all six PHPUnit cells red on development with zero failing assertions (run 35012220984). --- .../Controller/BreachProxyControllerConnectionReportTest.php | 2 ++ tests/Unit/Service/Connection/ConnectionReporterTest.php | 2 ++ tests/Unit/Service/SiemConnectionReportCallersTest.php | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/tests/Unit/Controller/BreachProxyControllerConnectionReportTest.php b/tests/Unit/Controller/BreachProxyControllerConnectionReportTest.php index 9bed05929..a2aa153f6 100644 --- a/tests/Unit/Controller/BreachProxyControllerConnectionReportTest.php +++ b/tests/Unit/Controller/BreachProxyControllerConnectionReportTest.php @@ -53,6 +53,8 @@ * Unit tests for the connection report of BreachProxyController::range(). * * @covers \OCA\Keepiq\Controller\BreachProxyController + * @uses \OCA\Keepiq\Service\Connection\ConnectionReporter + * @uses \OCA\Keepiq\Service\Connection\ConnectionObservations */ class BreachProxyControllerConnectionReportTest extends TestCase { diff --git a/tests/Unit/Service/Connection/ConnectionReporterTest.php b/tests/Unit/Service/Connection/ConnectionReporterTest.php index aef9468ea..6f5f3d899 100644 --- a/tests/Unit/Service/Connection/ConnectionReporterTest.php +++ b/tests/Unit/Service/Connection/ConnectionReporterTest.php @@ -48,6 +48,8 @@ * Unit tests for ConnectionReporter. * * @covers \OCA\Keepiq\Service\Connection\ConnectionReporter + * @uses \OCA\Keepiq\Service\Connection\ConnectionObservations + * @uses \OCA\Keepiq\Db\SiemSink */ class ConnectionReporterTest extends TestCase { diff --git a/tests/Unit/Service/SiemConnectionReportCallersTest.php b/tests/Unit/Service/SiemConnectionReportCallersTest.php index dd212d608..11e2ca162 100644 --- a/tests/Unit/Service/SiemConnectionReportCallersTest.php +++ b/tests/Unit/Service/SiemConnectionReportCallersTest.php @@ -51,6 +51,11 @@ * * @covers \OCA\Keepiq\Service\SiemSinkService * @covers \OCA\Keepiq\Service\SiemService + * @uses \OCA\Keepiq\Service\Connection\ConnectionReporter + * @uses \OCA\Keepiq\Service\Connection\ConnectionObservations + * @uses \OCA\Keepiq\Service\SiemAuditTrail + * @uses \OCA\Keepiq\Db\SiemSink + * @uses \OCA\Keepiq\Db\SiemQueueItem */ class SiemConnectionReportCallersTest extends TestCase {