Merge pull request #19025 from nextcloud/backport/19017/stable18

[stable18] Increase the timeout for app downloads
This commit is contained in:
Roeland Jago Douma 2020-01-21 11:55:38 +01:00 committed by GitHub
commit 986ad0a497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -271,7 +271,7 @@ class Installer {
// Download the release
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
$client = $this->clientService->newClient();
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile]);
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 120]);
// Check if the signature actually matches the downloaded content
$certificate = openssl_get_publickey($app['certificate']);

View file

@ -347,7 +347,7 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile]);
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
@ -431,7 +431,7 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile]);
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
@ -514,7 +514,7 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile]);
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
@ -593,7 +593,7 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile]);
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->at(0))
->method('newClient')
@ -679,7 +679,7 @@ JXhrdaWDZ8fzpUjugrtC3qslsqL0dzgU37anS3HwrT8=',
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile]);
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->at(1))
->method('newClient')