tests: more fixes, but stuff is still broken

This commit is contained in:
Matthew Penner 2022-12-14 19:53:07 -07:00
parent 10b2380e9e
commit 7f669828c6
No known key found for this signature in database
10 changed files with 36 additions and 85 deletions

View file

@ -61,8 +61,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
{
$server = $this->createServerModel();
$host = DatabaseHost::factory()->create();
$node = Node::factory()->create(['location_id' => $server->location->id]);
DatabaseHost::factory()->create();
config()->set('pterodactyl.client_features.databases.allow_random', false);
@ -96,9 +96,9 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
{
$server = $this->createServerModel();
$node = Node::factory()->create(['location_id' => $server->location->id]);
DatabaseHost::factory()->create();
$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,
@ -123,8 +123,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
{
$server = $this->createServerModel();
$node = Node::factory()->create(['location_id' => $server->location->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,