mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
fix: optimize queries and caching for projects and environments
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Once;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Test Case
|
||||
@@ -12,6 +15,22 @@
|
||||
*/
|
||||
uses(Tests\TestCase::class)->in('Feature');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Test Hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Global hooks that run before/after each test.
|
||||
|
|
||||
*/
|
||||
beforeEach(function () {
|
||||
// Flush the Once memoization cache to ensure tests get fresh data
|
||||
Once::flush();
|
||||
|
||||
// Flush the Server identity map cache to ensure tests get fresh data
|
||||
Server::flushIdentityMap();
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Expectations
|
||||
|
||||
Reference in New Issue
Block a user