feat(config): default read URLs use anonymous HTTPS; keep env overrides; pin scheme with offline test
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Toolbox\Config;
|
||||
|
||||
Harness::suite('group12');
|
||||
|
||||
Harness::it('los defaults de lectura son HTTPS anónimos y los env ganan', function () {
|
||||
putenv('DUCKBRAIN_TOOLBOX_URL');
|
||||
putenv('DUCKBRAIN_CORE_URL');
|
||||
|
||||
ok(str_starts_with(Config::toolboxUrl(), 'https://'), 'toolboxUrl por defecto en https');
|
||||
ok(str_starts_with(Config::coreUrl(), 'https://'), 'coreUrl por defecto en https');
|
||||
|
||||
putenv('DUCKBRAIN_CORE_URL=ssh://git@example.test/kj/duckbrain.git');
|
||||
eq('ssh://git@example.test/kj/duckbrain.git', Config::coreUrl(), 'el override gana sobre el default');
|
||||
|
||||
putenv('DUCKBRAIN_CORE_URL');
|
||||
});
|
||||
Reference in New Issue
Block a user