coolify/tests/Feature
Andras Bacsai 5ce0670ca4 fix: ensure negative cache results are stored in TrustHosts middleware
Problem:
- Cache::remember() does not cache null return values
- When no FQDN was configured, the closure returned null
- This caused DB queries on every request, defeating the cache

Solution:
- Use empty string ('') as sentinel value instead of null
- Convert sentinel back to null after retrieving from cache
- Now both positive and negative results are cached properly

Changes:
- Return empty string from closure instead of null
- Add explicit sentinel-to-null conversion after cache retrieval
- Add test to verify negative caching works correctly

This ensures zero DB queries even when FQDN is not configured.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 22:15:55 +02:00
..
CloudInitScriptTest.php feat: add cloud-init script support for Hetzner server creation 2025-10-10 19:37:16 +02:00
ConvertArraysTest.php fix: check if array is associative or not 2024-09-03 17:04:56 +02:00
ConvertContainerEnvsToArray.php chore(tests): update test environment database name and add new feature test for converting container environment variables to array 2025-05-22 14:30:16 +02:00
ConvertingGitUrlsTest.php fix: add tests for git url converts 2024-11-12 11:32:18 +01:00
DatabaseBackupJobTest.php feat(backup): enhance backup job with S3 upload handling and notifications 2025-10-07 15:02:23 +02:00
DockerCustomCommandsTest.php refactor 2025-04-23 13:22:01 +02:00
ExecuteContainerCommandTest.php test: setup database for upcoming tests 2024-12-04 12:43:52 +01:00
HetznerServerCreationTest.php feat: add IPv4/IPv6 network configuration for Hetzner server creation 2025-10-10 18:22:25 +02:00
IpAllowlistTest.php refactor(dns-validation): rename DNS validation functions for consistency and clarity, and remove unused code 2025-09-09 09:00:35 +02:00
MultilineEnvironmentVariableTest.php feat(deployments): enhance Docker build argument handling for multiline variables 2025-10-02 13:54:36 +02:00
TeamInvitationEmailNormalizationTest.php refactor(ui): improve styling and consistency in environment variable warning and docker cleanup components 2025-09-25 11:45:07 +02:00
TrustHostsMiddlewareTest.php fix: ensure negative cache results are stored in TrustHosts middleware 2025-10-15 22:15:55 +02:00
Utf8HandlingTest.php feat(utf8-handling): implement UTF-8 sanitization for command outputs and enhance error handling in logs processing 2025-06-05 14:27:39 +02:00