mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
test(env): cover spaced shared variable inside a longer value (#7202)
This commit is contained in:
1 parent
960471984c
commit
c3e5b4ba73
1 file changed
+20
@@ -76,6 +76,26 @@ test('shared variable with spaces resolves correctly', function () {
|
||||
expect($realValue)->toBe('test-value-123');
|
||||
});
|
||||
|
||||
test('spaced shared variable inside a longer value resolves for the container (#7202)', function () {
|
||||
SharedEnvironmentVariable::create([
|
||||
'key' => 'DOMAIN',
|
||||
'value' => 'example.com',
|
||||
'type' => 'project',
|
||||
'project_id' => $this->project->id,
|
||||
'team_id' => $this->team->id,
|
||||
]);
|
||||
|
||||
$env = EnvironmentVariable::create([
|
||||
'key' => 'PUBLIC_APIURL',
|
||||
'value' => 'https://{{ project.DOMAIN }}/api',
|
||||
'resourceable_id' => $this->application->id,
|
||||
'resourceable_type' => $this->application->getMorphClass(),
|
||||
]);
|
||||
|
||||
expect($env->real_value)->toBe('https://example.com/api')
|
||||
->and($env->getResolvedValueWithServer())->toBe('https://example.com/api');
|
||||
});
|
||||
|
||||
test('shared variable without spaces resolves correctly', function () {
|
||||
// Create shared variable
|
||||
$shared = SharedEnvironmentVariable::create([
|
||||
|
||||
Reference in new issue
Block a user