diff --git a/app/Http/Controllers/UpdateController.php b/app/Http/Controllers/UpdateController.php index 3979231b..e163f5f1 100644 --- a/app/Http/Controllers/UpdateController.php +++ b/app/Http/Controllers/UpdateController.php @@ -115,7 +115,7 @@ class UpdateController extends Controller $update_cache = storage_path('update_cache'); if (! is_dir($update_cache)) { - if (false === Storage::disk('storage')->makeDirectory('update_cache')) { + if (false === Storage::disk('root')->makeDirectory('storage/update_cache')) { return response(trans('admin.update.errors.write-permission')); } } diff --git a/config/filesystems.php b/config/filesystems.php index 7b214947..08d83f64 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -28,7 +28,7 @@ return [ | */ - 'cloud' => 's3', + 'cloud' => 'testing', /* |-------------------------------------------------------------------------- @@ -53,35 +53,15 @@ return [ 'root' => base_path(), ], - 'storage' => [ - 'driver' => 'local', - 'root' => storage_path(), - ], - 'textures' => [ 'driver' => menv('FS_DRIVER', 'local'), 'root' => storage_path('textures'), - 'visibility' => 'public', - ], - - 'cache' => [ - 'driver' => 'local', - 'root' => storage_path('cache'), - 'visibility' => 'public', ], 'testing' => [ 'driver' => 'memory' ], - 's3' => [ - 'driver' => 's3', - 'key' => 'your-key', - 'secret' => 'your-secret', - 'region' => 'your-region', - 'bucket' => 'your-bucket', - ], - ], ]; diff --git a/tests/UpdateControllerTest.php b/tests/UpdateControllerTest.php index 3745a020..0d85dd49 100644 --- a/tests/UpdateControllerTest.php +++ b/tests/UpdateControllerTest.php @@ -114,14 +114,14 @@ class UpdateControllerTest extends TestCase $this->generateFakeUpdateFile(); // Prepare for downloading - Storage::disk('storage')->deleteDirectory('update_cache'); + Storage::disk('root')->deleteDirectory('storage/update_cache'); $this->generateFakeUpdateInfo('4.0.0'); Storage::shouldReceive('disk') - ->with('storage') + ->with('root') ->once() ->andReturnSelf(); Storage::shouldReceive('makeDirectory') - ->with('update_cache') + ->with('storage/update_cache') ->once() ->andReturn(false); $this->get('/admin/update/download?action=prepare-download')