mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 10:23:46 +02:00
tests(integration): fix database services
This commit is contained in:
@@ -64,8 +64,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
$host = DatabaseHost::factory()->create();
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id, 'database_host_id' => $host->id]);
|
||||
|
||||
config()->set('pterodactyl.client_features.databases.allow_random', false);
|
||||
|
||||
@@ -99,9 +99,9 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
$host = DatabaseHost::factory()->create(['node_id' => $server->node_id]);
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id, 'database_host_id' => DatabaseHost::factory()->create()->id]);
|
||||
$host = DatabaseHost::factory()->create();
|
||||
$server->node->database_host_id = $host->id;
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
@@ -126,8 +126,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
$host = DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
$host = DatabaseHost::factory()->create();
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id, 'database_host_id' => $host->id]);
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
|
||||
Reference in New Issue
Block a user