mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Reduce overhead of health check endpoints
This commit is contained in:
committed by
Constantin Graf
parent
d3545b3c73
commit
cc10af0b97
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Tests\Unit\Endpoint\Web;
|
||||
|
||||
use App\Http\Controllers\Web\HealthCheckController;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\UsesClass;
|
||||
|
||||
@@ -14,10 +15,16 @@ class HealthCheckEndpointTest extends EndpointTestAbstract
|
||||
{
|
||||
public function test_up_endpoint_returns_ok(): void
|
||||
{
|
||||
// Arrange
|
||||
DB::enableQueryLog();
|
||||
DB::flushQueryLog();
|
||||
|
||||
// Act
|
||||
$response = $this->get('health-check/up');
|
||||
$queryLog = DB::getQueryLog();
|
||||
|
||||
// Assert
|
||||
$this->assertCount(0, $queryLog);
|
||||
$response->assertSuccessful();
|
||||
$response->assertExactJson([
|
||||
'success' => true,
|
||||
|
||||
Reference in New Issue
Block a user