diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b9975e5..2c99dc37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ env: FTP_USER: username FTP_PASSWORD: password FTP_PORT: 21 - FTP_ROOT: /home/vsftpd/username + FTP_ROOT: /tmp jobs: lunix-tests: @@ -42,7 +42,7 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysql, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, redis coverage: none - - run: docker run --net=host -p 21:21 -p 20:20 -p 12020:12020 -p 12021:12021 -p 12022:12022 -p 12023:12023 -p 12024:12024 -p 12025:12025 -e USER=$FTP_USER -e PASS=$FTP_PASSWORD -d --name ftp -v $(pwd)/:/ftp/$FTP_USER papacdev/vsftpd + - run: docker run -p 21:21 -p 20:20 -p 12020:12020 -p 12021:12021 -p 12022:12022 -p 12023:12023 -p 12024:12024 -p 12025:12025 -e USER=$FTP_USER -e PASS=$FTP_PASSWORD -d --name ftp papacdev/vsftpd - run: docker run -p 1080:1080 -p 1025:1025 -d --name maildev soulteary/maildev - run: docker run -p 6379:6379 -d --name redis redis - run: docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres -e POSTGRES_PASSWORD=postgres -d postgis/postgis diff --git a/src/Storage/Service/FTPService.php b/src/Storage/Service/FTPService.php index 7fc5026b..1c2ade9f 100644 --- a/src/Storage/Service/FTPService.php +++ b/src/Storage/Service/FTPService.php @@ -112,7 +112,7 @@ public function connect() $this->login(); $this->changePath(); - $this->setConnectionPassiveMode(); + $this->activePassiveMode(); } /** @@ -642,7 +642,7 @@ private function readStream(string $path): mixed * * @throws RuntimeException */ - private function setConnectionPassiveMode() + private function activePassiveMode() { if (!ftp_pasv($this->connection, $this->use_passive_mode)) { throw new RuntimeException( diff --git a/tests/Config/stubs/storage.php b/tests/Config/stubs/storage.php index 4fcc382a..81857865 100644 --- a/tests/Config/stubs/storage.php +++ b/tests/Config/stubs/storage.php @@ -27,7 +27,7 @@ 'password' => app_env('FTP_PASSWORD', 'password'), 'username' => app_env('FTP_USERNAME', 'username'), 'port' => app_env('FTP_PORT', 21), - 'root' => app_env('FTP_ROOT', sys_get_temp_dir()), // Start directory + 'root' => app_env('FTP_ROOT', '/tmp'), // Start directory 'tls' => app_env('FTP_SSL', false), // `true` enable the secure connexion. 'timeout' => app_env('FTP_TIMEOUT', 90) // Temps d'attente de connection ],