database-host: reverse node relationship
This commit is contained in:
parent
0c5416ee27
commit
507a802dec
5 changed files with 20 additions and 24 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue