mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 11:55:51 -05:00
database-host: reverse node relationship
This commit is contained in:
@@ -62,7 +62,7 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
DatabaseHost::factory()->create();
|
||||
|
||||
config()->set('pterodactyl.client_features.databases.allow_random', false);
|
||||
|
||||
@@ -97,8 +97,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_id' => $server->node_id]);
|
||||
DatabaseHost::factory()->create();
|
||||
$host = DatabaseHost::factory()->create();
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
@@ -124,7 +124,7 @@ 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();
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
|
||||
Reference in New Issue
Block a user