coolify/tests
Andras Bacsai 74bb8f49ce Fix: Correct time inconsistency in ServerStorageCheckIndependenceTest
Move Carbon::setTestNow() to the beginning of each test before creating
test data. Previously, tests created servers using now() (real current
time) and only afterwards called Carbon::setTestNow(), making
sentinel_updated_at inconsistent with the test clock.

This caused staleness calculations to use different timelines:
- sentinel_updated_at was based on real time (e.g., Dec 2024)
- Test execution time was frozen at 2025-01-15

Now all timestamps use the same frozen test time, making staleness
checks predictable and tests reliable regardless of when they run.

Affected tests (all 7 test cases in the file):
- does not dispatch storage check when sentinel is in sync
- dispatches storage check when sentinel is out of sync
- dispatches storage check when sentinel is disabled
- respects custom hourly storage check frequency when sentinel is out of sync
- handles VALID_CRON_STRINGS mapping correctly when sentinel is out of sync
- respects server timezone for storage checks when sentinel is out of sync
- does not dispatch storage check outside schedule

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 10:22:09 +01:00
..
Browser feat(core): You can validate compose files with docker compose config 2025-02-27 11:29:04 +01:00
Feature Fix: Correct time inconsistency in ServerStorageCheckIndependenceTest 2025-12-03 10:22:09 +01:00
Traits test: setup database for upcoming tests 2024-12-04 12:43:52 +01:00
Unit Merge branch 'next' into decouple-storage-from-sentinel 2025-12-03 09:19:09 +01:00
CreatesApplication.php Fix styling 2024-06-10 20:43:34 +00:00
DuskTestCase.php Refactor DuskTestCase.php to use a hardcoded base URL 2024-10-17 21:26:06 +02:00
Pest.php feat(core): You can validate compose files with docker compose config 2025-02-27 11:29:04 +01:00
TestCase.php init of v4 🌮 2023-03-17 15:33:48 +01:00