mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-29 10:55:43 -05:00
### Description You're able to enable a "skip egg install scripts" per server, while still being able to reinstall a server. With this setting enabled, reinstalling a server has no functional use, the server is locked and shutdown, then simply unlocked immediately afterwards after a success signal from wings. This PR disables the reinstall button when skip install scripts is enabled for both the user and admin, with a little component telling you why you cannot reinstall. The reinstall button is not disabled if the server is in a status that reinstall could resolve (eg. failed install). ### Resolved issues: 1. [x] resolves pterodactyl/panel#5306
27 lines
835 B
PHP
27 lines
835 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Tests\Integration\Api\Application\Servers;
|
|
|
|
use Pterodactyl\Tests\Integration\Api\Application\ApplicationApiIntegrationTestCase;
|
|
|
|
class ServerControllerTest extends ApplicationApiIntegrationTestCase
|
|
{
|
|
/**
|
|
* Test that the "skip scripts" state is returned for a server.
|
|
*/
|
|
public function testSkipScriptsStateIsReturned()
|
|
{
|
|
$server = $this->createServerModel(['skip_scripts' => true]);
|
|
|
|
$this->getJson('/api/application/servers/' . $server->id)
|
|
->assertOk()
|
|
->assertJsonPath('attributes.container.skip_scripts', true);
|
|
|
|
$server->update(['skip_scripts' => false]);
|
|
|
|
$this->getJson('/api/application/servers/' . $server->id)
|
|
->assertOk()
|
|
->assertJsonPath('attributes.container.skip_scripts', false);
|
|
}
|
|
}
|