mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Convert variable "rules" to array (#507)
* convert variable "rules" to array * allow importing eggs with string rules * fix tests * update stock eggs to rules array
This commit is contained in:
@@ -120,7 +120,7 @@ class UpdateStartupVariableTest extends ClientApiIntegrationTestCase
|
||||
[$user, $server] = $this->generateTestAccount();
|
||||
|
||||
$egg = $this->cloneEggAndVariables($server->egg);
|
||||
$egg->variables()->first()->update(['rules' => 'nullable|string']);
|
||||
$egg->variables()->first()->update(['rules' => ['nullable', 'string']]);
|
||||
|
||||
$server->fill(['egg_id' => $egg->id])->save();
|
||||
$server->refresh();
|
||||
|
||||
@@ -120,7 +120,7 @@ class VariableValidatorServiceTest extends IntegrationTestCase
|
||||
$egg = $this->cloneEggAndVariables($this->egg);
|
||||
$egg->variables()->where('env_variable', '!=', 'BUNGEE_VERSION')->delete();
|
||||
|
||||
$egg->variables()->update(['rules' => 'nullable|string']);
|
||||
$egg->variables()->update(['rules' => ['nullable', 'string']]);
|
||||
|
||||
$response = $this->getService()->handle($egg->id, []);
|
||||
$this->assertCount(1, $response);
|
||||
|
||||
Reference in New Issue
Block a user