diff --git a/tests/Fixtures/api/admin/nodes.store.json b/tests/Fixtures/api/admin/nodes.store.json index 20769599f..3d6c17fea 100644 --- a/tests/Fixtures/api/admin/nodes.store.json +++ b/tests/Fixtures/api/admin/nodes.store.json @@ -11,7 +11,7 @@ "name": "node-gamma", "description": "Created by an admin", "location_id": 1, - "fqdn": "gamma.example.test", + "fqdn": "localhost", "scheme": "https", "behind_proxy": false, "maintenance_mode": false, diff --git a/tests/Fixtures/api/admin/nodes.update.json b/tests/Fixtures/api/admin/nodes.update.json index 889065f8d..755d3f1a4 100644 --- a/tests/Fixtures/api/admin/nodes.update.json +++ b/tests/Fixtures/api/admin/nodes.update.json @@ -11,7 +11,7 @@ "name": "node-alpha-renamed", "description": "Created by an admin", "location_id": 1, - "fqdn": "alpha.example.test", + "fqdn": "localhost", "scheme": "https", "behind_proxy": false, "maintenance_mode": false, diff --git a/tests/Fixtures/api/application/nodes.store.json b/tests/Fixtures/api/application/nodes.store.json index df9d872c1..e6557d294 100644 --- a/tests/Fixtures/api/application/nodes.store.json +++ b/tests/Fixtures/api/application/nodes.store.json @@ -11,7 +11,7 @@ "name": "node-gamma", "description": "Created through the API", "location_id": 1, - "fqdn": "gamma.example.test", + "fqdn": "localhost", "scheme": "https", "behind_proxy": false, "maintenance_mode": false, diff --git a/tests/Fixtures/api/application/nodes.update.json b/tests/Fixtures/api/application/nodes.update.json index 4b59efee0..d36caec19 100644 --- a/tests/Fixtures/api/application/nodes.update.json +++ b/tests/Fixtures/api/application/nodes.update.json @@ -11,7 +11,7 @@ "name": "node-alpha-renamed", "description": "Created through the API", "location_id": 1, - "fqdn": "alpha.example.test", + "fqdn": "localhost", "scheme": "https", "behind_proxy": false, "maintenance_mode": false, diff --git a/tests/Integration/Api/Fixtures/AdminApiFixturesTest.php b/tests/Integration/Api/Fixtures/AdminApiFixturesTest.php index 67549a5fa..4b277b1ac 100644 --- a/tests/Integration/Api/Fixtures/AdminApiFixturesTest.php +++ b/tests/Integration/Api/Fixtures/AdminApiFixturesTest.php @@ -179,7 +179,8 @@ function adminReads(): array function adminWrites(): array { - $node = ['name' => 'node-gamma', 'description' => 'Created by an admin', 'location_id' => 1, 'public' => true, 'fqdn' => 'gamma.example.test', 'scheme' => 'https', 'behind_proxy' => false, 'maintenance_mode' => false, 'memory' => 2048, 'memory_overallocate' => 0, 'disk' => 20480, 'disk_overallocate' => 0, 'upload_size' => 100, 'daemon_listen' => 8080, 'daemon_sftp' => 2022, 'daemon_base' => '/var/lib/pterodactyl/volumes']; + // A node's fqdn has to resolve, and only localhost does without DNS. + $node = ['name' => 'node-gamma', 'description' => 'Created by an admin', 'location_id' => 1, 'public' => true, 'fqdn' => 'localhost', 'scheme' => 'https', 'behind_proxy' => false, 'maintenance_mode' => false, 'memory' => 2048, 'memory_overallocate' => 0, 'disk' => 20480, 'disk_overallocate' => 0, 'upload_size' => 100, 'daemon_listen' => 8080, 'daemon_sftp' => 2022, 'daemon_base' => '/var/lib/pterodactyl/volumes']; $egg = ['name' => 'Created Egg', 'description' => 'A freshly created egg.', 'docker_images' => "Java 21|ghcr.io/pterodactyl/yolks:java_21\nJava 17|ghcr.io/pterodactyl/yolks:java_17", 'startup' => 'java -jar server.jar', 'config_stop' => 'stop', 'config_startup' => '{"done": ["Done"]}', 'config_logs' => '{}', 'config_files' => '{}', 'features' => ['eula', 'fastdl']]; $environment = ['SERVER_JARFILE' => 'server.jar', 'BUILD_NUMBER' => '42', 'HIDDEN_TOKEN' => 'abc']; $server = [ @@ -216,7 +217,7 @@ function adminWrites(): array 'admin/mounts/eggs.attach' => ['requests' => [['POST', ADMIN.'/mounts/2/eggs?include=eggs,nodes', ['eggs' => [1, 2]]]]], 'admin/mounts/nodes.attach' => ['requests' => [['POST', ADMIN.'/mounts/2/nodes', ['nodes' => [1]]]]], 'admin/nodes.store' => ['requests' => [['POST', ADMIN.'/nodes', $node]]], - 'admin/nodes.update' => ['requests' => [['PUT', ADMIN.'/nodes/1', [...$node, 'name' => 'node-alpha-renamed', 'fqdn' => 'alpha.example.test', 'memory' => 16384]]]], + 'admin/nodes.update' => ['requests' => [['PUT', ADMIN.'/nodes/1', [...$node, 'name' => 'node-alpha-renamed', 'memory' => 16384]]]], 'admin/nodes/allocations.update' => ['requests' => [['PUT', ADMIN.'/nodes/1/allocations/4', ['alias' => 'renamed.example.test']]]], 'admin/nodes/deployment-tags.update' => ['requests' => [['PUT', ADMIN.'/nodes/1/deployment-tags', ['tags' => [3]]]]], 'admin/nodes/tags.update' => ['requests' => [['PUT', ADMIN.'/nodes/1/tags', ['tags' => [1, 2]]]]], diff --git a/tests/Integration/Api/Fixtures/ApplicationApiFixturesTest.php b/tests/Integration/Api/Fixtures/ApplicationApiFixturesTest.php index bcacebc43..203f2dd22 100644 --- a/tests/Integration/Api/Fixtures/ApplicationApiFixturesTest.php +++ b/tests/Integration/Api/Fixtures/ApplicationApiFixturesTest.php @@ -182,7 +182,8 @@ function applicationAcl(): array function applicationWrites(): array { - $node = ['name' => 'node-gamma', 'description' => 'Created through the API', 'location_id' => 1, 'public' => true, 'fqdn' => 'gamma.example.test', 'scheme' => 'https', 'behind_proxy' => false, 'maintenance_mode' => false, 'memory' => 2048, 'memory_overallocate' => 0, 'disk' => 20480, 'disk_overallocate' => 0, 'upload_size' => 100, 'daemon_listen' => 8080, 'daemon_sftp' => 2022, 'daemon_base' => '/var/lib/pterodactyl/volumes']; + // A node's fqdn has to resolve, and only localhost does without DNS. + $node = ['name' => 'node-gamma', 'description' => 'Created through the API', 'location_id' => 1, 'public' => true, 'fqdn' => 'localhost', 'scheme' => 'https', 'behind_proxy' => false, 'maintenance_mode' => false, 'memory' => 2048, 'memory_overallocate' => 0, 'disk' => 20480, 'disk_overallocate' => 0, 'upload_size' => 100, 'daemon_listen' => 8080, 'daemon_sftp' => 2022, 'daemon_base' => '/var/lib/pterodactyl/volumes']; $environment = ['SERVER_JARFILE' => 'server.jar', 'BUILD_NUMBER' => '42', 'HIDDEN_TOKEN' => 'abc']; $user = ['username' => 'owner', 'email' => 'owner@example.test', 'first_name' => 'Olivia', 'last_name' => 'Owner', 'language' => 'en']; @@ -190,7 +191,7 @@ function applicationWrites(): array 'application/locations.store' => ['requests' => [['POST', APP.'/locations', ['short' => 'ap-south', 'long' => 'Asia Pacific "South"']]]], 'application/locations.update' => ['requests' => [['PATCH', APP.'/locations/1', ['short' => 'us-east-1', 'long' => 'US East (renamed)']]]], 'application/nodes.store' => ['requests' => [['POST', APP.'/nodes', $node]]], - 'application/nodes.update' => ['requests' => [['PATCH', APP.'/nodes/1', [...$node, 'name' => 'node-alpha-renamed', 'fqdn' => 'alpha.example.test', 'memory' => 16384]]]], + 'application/nodes.update' => ['requests' => [['PATCH', APP.'/nodes/1', [...$node, 'name' => 'node-alpha-renamed', 'memory' => 16384]]]], 'application/servers.store' => ['requests' => [['POST', APP.'/servers', [ 'name' => 'Created Server', 'description' => 'Created through the API', 'external_id' => 'ext-created', 'user' => World::OWNER, 'egg' => 1, 'docker_image' => 'ghcr.io/pterodactyl/yolks:java_21', 'startup' => 'java -jar {{SERVER_JARFILE}}', 'environment' => $environment,