Add database and database users sync (#537)

* Add database and database users sync

* get mysl users

* add mariadb and postgres

* fix phpstan
This commit is contained in:
Saeed Vaziry
2025-03-12 22:59:25 +01:00
committed by GitHub
parent 493cbb0849
commit 0f06d81aac
17 changed files with 383 additions and 65 deletions

View File

@ -76,6 +76,7 @@ public function test_see_databases_list(): void
{
$this->actingAs($this->user);
/** @var Database $database */
$database = Database::factory()->create([
'server_id' => $this->server,
]);
@ -91,6 +92,7 @@ public function test_delete_database(): void
SSH::fake();
/** @var Database $database */
$database = Database::factory()->create([
'server_id' => $this->server,
]);
@ -105,4 +107,17 @@ public function test_delete_database(): void
'id' => $database->id,
]);
}
public function test_sync_databases(): void
{
$this->actingAs($this->user);
SSH::fake();
Livewire::test(Index::class, [
'server' => $this->server,
])
->callAction('sync')
->assertSuccessful();
}
}