mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -21,7 +21,7 @@ public function test_install_vito_agent(): void
|
||||
'https://api.github.com/repos/vitodeploy/agent/tags' => Http::response([['name' => '0.1.0']]),
|
||||
]);
|
||||
|
||||
$this->server->monitoring()->delete();
|
||||
$this->server->monitoring()?->delete();
|
||||
|
||||
app(Install::class)->install($this->server, [
|
||||
'type' => 'monitoring',
|
||||
@ -40,7 +40,7 @@ public function test_install_vito_agent(): void
|
||||
|
||||
public function test_install_vito_agent_failed(): void
|
||||
{
|
||||
$this->server->monitoring()->delete();
|
||||
$this->server->monitoring()?->delete();
|
||||
$this->expectExceptionMessage('Failed to fetch tags');
|
||||
SSH::fake('Active: inactive');
|
||||
Http::fake([
|
||||
|
@ -20,7 +20,7 @@ public function test_uninstall_vito_agent(): void
|
||||
{
|
||||
SSH::fake();
|
||||
|
||||
$this->server->monitoring()->delete();
|
||||
$this->server->monitoring()?->delete();
|
||||
|
||||
$service = Service::factory()->create([
|
||||
'server_id' => $this->server->id,
|
||||
|
@ -6,6 +6,7 @@
|
||||
use App\Models\Backup;
|
||||
use App\Models\Database;
|
||||
use App\Models\StorageProvider;
|
||||
use App\StorageProviders\Dropbox;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
@ -29,7 +30,7 @@ public function test_run_backups(): void
|
||||
|
||||
$storage = StorageProvider::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'provider' => \App\Enums\StorageProvider::DROPBOX,
|
||||
'provider' => Dropbox::id(),
|
||||
]);
|
||||
|
||||
$backup = Backup::factory()->create([
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Tests\Unit\SSH\Services\Database;
|
||||
|
||||
use App\Facades\SSH;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use App\Services\Database\Database;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Tests\Unit\SSH\Services\Database;
|
||||
|
||||
use App\Facades\SSH;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use App\Services\Database\Database;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Tests\Unit\SSH\Services\Database;
|
||||
|
||||
use App\Facades\SSH;
|
||||
use App\SSH\Services\Database\Database;
|
||||
use App\Services\Database\Database;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests\Unit\StorageProviders;
|
||||
|
||||
use App\Enums\StorageProvider;
|
||||
use App\Models\StorageProvider as StorageProviderModel;
|
||||
use App\StorageProviders\S3;
|
||||
use Aws\Command;
|
||||
@ -18,7 +17,7 @@ class S3Test extends TestCase
|
||||
public function test_s3_connect_successful(): void
|
||||
{
|
||||
$storageProvider = StorageProviderModel::factory()->create([
|
||||
'provider' => StorageProvider::S3,
|
||||
'provider' => S3::id(),
|
||||
'credentials' => [
|
||||
'api_url' => 'https://fake-bucket.s3.us-east-1.s3-compatible.com',
|
||||
'key' => 'fake-key',
|
||||
@ -62,7 +61,7 @@ public function test_s3_connect_successful(): void
|
||||
public function test_s3_connect_failure(): void
|
||||
{
|
||||
$storageProvider = StorageProviderModel::factory()->create([
|
||||
'provider' => StorageProvider::S3,
|
||||
'provider' => S3::id(),
|
||||
'credentials' => [
|
||||
'key' => 'fake-key',
|
||||
'secret' => 'fake-secret',
|
||||
|
Reference in New Issue
Block a user