tests(integration): fix database services
This commit is contained in:
parent
ffdf27e606
commit
350ef1aba5
3 changed files with 15 additions and 16 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue