Merge pull request #17452 from uberbrady/de_flake_tls_cert_file_test

This test was flaky, probably due to the PHP statcache.
This commit is contained in:
snipe
2025-07-23 15:00:59 +01:00
committed by GitHub
+1
View File
@@ -228,6 +228,7 @@ class LdapTest extends TestCase
$this->settings->enableLdap()->set(['ldap_client_tls_cert' => 'SAMPLE CERT TEXT']);
$client_side_cert_path = Setting::get_client_side_cert_path();
file_put_contents($client_side_cert_path, 'WEIRDLY UPDATED CERT FILE');
clearstatcache();
//the system should respect our cache-file, since the settings haven't been updated
$possibly_recached_cert_file = Setting::get_client_side_cert_path(); //this should *NOT* re-cache from the Settings
$this->assertStringEqualsFile($possibly_recached_cert_file, 'WEIRDLY UPDATED CERT FILE');