fix: use port range on free allocation lookup (#1882)

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
This commit is contained in:
PalmarHealer
2025-11-17 10:56:48 +01:00
committed by GitHub
parent 886836c60a
commit 5e25ea4a43
2 changed files with 12 additions and 8 deletions

View File

@@ -29,10 +29,13 @@ class FindAssignableAllocationServiceTest extends IntegrationTestCase
public function test_existing_allocation_is_preferred(): void
{
$server = $this->createServerModel();
config()->set('panel.client_features.allocations.range_start', 5000);
config()->set('panel.client_features.allocations.range_end', 5005);
$created = Allocation::factory()->create([
'node_id' => $server->node_id,
'ip' => $server->allocation->ip,
'port' => 5005,
]);
$response = $this->getService()->handle($server);