From 11903e7478a80633a7695cfd729032eb25855aaa Mon Sep 17 00:00:00 2001 From: Frank Brendel Date: Tue, 3 Jul 2018 08:49:58 +0200 Subject: [PATCH] monit: create template before stopping Monit for ServiceController test --- .../mvc/tests/app/compound/OPNsense/Monit/MonitTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opnsense/mvc/tests/app/compound/OPNsense/Monit/MonitTest.php b/src/opnsense/mvc/tests/app/compound/OPNsense/Monit/MonitTest.php index 5b3ede763..d64ebc8de 100644 --- a/src/opnsense/mvc/tests/app/compound/OPNsense/Monit/MonitTest.php +++ b/src/opnsense/mvc/tests/app/compound/OPNsense/Monit/MonitTest.php @@ -286,6 +286,10 @@ class MonitTest extends \PHPUnit\Framework\TestCase $svcMonit = new \OPNsense\Monit\Api\ServiceController; $_SERVER['REQUEST_METHOD'] = 'POST'; + // configtest + $response = $svcMonit->configtestAction(); + $this->assertEquals($response['result'], 'Control file syntax OK'); + // status $response = $svcMonit->statusAction(); $this->assertRegExp('/running|stopped/', $response['status']);