Files
coolify/tests/Feature/SslipServerHostnameTest.php
T
e3d4411ff2 chore: merge main into release/v4.5 (#12192)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com>
Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl>
Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com>
Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-18 23:43:20 +02:00

16 lines
593 B
PHP

<?php
use App\Models\Server;
it('builds the sslip.io domain from the IP address of the server', function (string $address, string $expected) {
$server = new Server(['ip' => $address]);
$server->id = 1;
expect(sslip($server))->toBe($expected);
})->with([
'IPv4' => ['188.245.12.182', 'http://188.245.12.182.sslip.io'],
'IPv6' => ['2a01:4f8:c016:bd23::1', 'http://2a01-4f8-c016-bd23--1.sslip.io'],
'resolvable hostname' => ['localhost', 'http://127.0.0.1.sslip.io'],
'unresolvable hostname' => ['coolify-test.invalid', 'http://coolify-test.invalid.sslip.io'],
]);