mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 20:14:45 +00:00
fix(vultr): validate public network and token scope
Require IPv6 when public IPv4 is disabled, constrain cloud token lookup by team and provider during deletion, and encode Vultr instance IDs in API paths.
This commit is contained in:
1 parent
31f904ef9f
commit
6ed92cb97a
11 files changed
+448
-20
No files matched your search
@@ -150,3 +150,17 @@ it('handles empty successful responses from Vultr API', function () {
|
||||
|
||||
Http::assertSentCount(2);
|
||||
});
|
||||
|
||||
it('encodes instance IDs in request paths', function () {
|
||||
Http::fake([
|
||||
'https://api.vultr.com/v2/instances/instance%2F1' => Http::response([
|
||||
'instance' => ['id' => 'instance/1'],
|
||||
], 200),
|
||||
]);
|
||||
|
||||
$service = new VultrService('fake-token');
|
||||
|
||||
expect($service->getInstance('instance/1')['id'])->toBe('instance/1');
|
||||
|
||||
Http::assertSent(fn ($request) => $request->url() === 'https://api.vultr.com/v2/instances/instance%2F1');
|
||||
});
|
||||
Reference in new issue
Block a user