coolify/tests/Unit/ApplicationConfigurationChangeTest.php
Andras Bacsai 237246acee fix: Remove duplicate custom_labels from config hash calculation
The `custom_labels` attribute was being concatenated twice into the configuration hash calculation within the `isConfigurationChanged` method. This commit removes the redundant inclusion to ensure accurate configuration change detection.
2025-11-01 13:28:56 +01:00

17 lines
786 B
PHP

<?php
/**
* Unit test to verify that custom_network_aliases is included in configuration change detection.
* Tests the behavior of the isConfigurationChanged method by verifying that different
* custom_network_aliases values produce different configuration hashes.
*/
it('different custom_network_aliases values produce different hashes', function () {
// Test that the hash calculation includes custom_network_aliases by computing hashes with different values
$hash1 = md5(base64_encode('test'.'api.internal,api.local'));
$hash2 = md5(base64_encode('test'.'api.internal,api.local,api.staging'));
$hash3 = md5(base64_encode('test'.null));
expect($hash1)->not->toBe($hash2)
->and($hash1)->not->toBe($hash3)
->and($hash2)->not->toBe($hash3);
});