mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 06:26:16 +00:00
Add API endpoint to update site aliases (#551)
This commit is contained in:
@ -118,6 +118,30 @@ public function test_delete_site(): void
|
||||
->assertNoContent();
|
||||
}
|
||||
|
||||
public function test_update_aliases(): void
|
||||
{
|
||||
SSH::fake();
|
||||
|
||||
Sanctum::actingAs($this->user, ['read', 'write']);
|
||||
|
||||
/** @var Site $site */
|
||||
$site = Site::factory()->create([
|
||||
'server_id' => $this->server->id,
|
||||
]);
|
||||
|
||||
$this->json('PUT', route('api.projects.servers.sites.aliases', [
|
||||
'project' => $this->server->project,
|
||||
'server' => $this->server,
|
||||
'site' => $site,
|
||||
]), [
|
||||
'aliases' => ['example.com', 'example.net'],
|
||||
])
|
||||
->assertSuccessful()
|
||||
->assertJsonFragment([
|
||||
'aliases' => ['example.com', 'example.net'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_update_load_balancer(): void
|
||||
{
|
||||
SSH::fake();
|
||||
|
Reference in New Issue
Block a user