Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-12-22 18:29:38 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-12-23 11:11:23 +0300
commit1e0eaa25d071c87e273cc9e6fc3dc3eaf5c84fd3 (patch)
treef9c3b153e2c94f6535b83b9fc7e0b3a0ac8aa436 /apps/federation/tests
parent7e9d8a8bd0d618a26d67ac6fbc346ebd6c439029 (diff)
Drop all dead packages
Apparently we have plenty of leftover of previous sub-dependencies. Composer automatically dumps those with any future dependency update, so I'm dropping them in an atomic step. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/federation/tests')
-rw-r--r--apps/federation/tests/BackgroundJob/GetSharedSecretTest.php38
-rw-r--r--apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php37
2 files changed, 0 insertions, 75 deletions
diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
index 7bd9208136b..6da3ba68940 100644
--- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
@@ -28,7 +28,6 @@
namespace OCA\Federation\Tests\BackgroundJob;
use GuzzleHttp\Exception\ConnectException;
-use GuzzleHttp\Ring\Exception\RingException;
use OCA\Federation\BackgroundJob\GetSharedSecret;
use OCA\Federation\TrustedServers;
use OCA\Files_Sharing\Tests\TestCase;
@@ -298,41 +297,4 @@ class GetSharedSecretTest extends TestCase {
$this->assertTrue($this->invokePrivate($this->getSharedSecret, 'retainJob'));
}
-
- public function testRunRingException() {
- $target = 'targetURL';
- $source = 'sourceURL';
- $token = 'token';
-
- $argument = ['url' => $target, 'token' => $token];
-
- $this->timeFactory->method('getTime')
- ->willReturn(42);
-
- $this->urlGenerator
- ->expects($this->once())
- ->method('getAbsoluteURL')
- ->with('/')
- ->willReturn($source);
- $this->httpClient->expects($this->once())->method('get')
- ->with(
- $target . '/ocs/v2.php/apps/federation/api/v1/shared-secret',
- [
- 'query' =>
- [
- 'url' => $source,
- 'token' => $token,
- 'format' => 'json',
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- )->willThrowException($this->createMock(RingException::class));
-
- $this->trustedServers->expects($this->never())->method('addSharedSecret');
-
- $this->invokePrivate($this->getSharedSecret, 'run', [$argument]);
-
- $this->assertTrue($this->invokePrivate($this->getSharedSecret, 'retainJob'));
- }
}
diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
index cb912d1676b..f03c5aa2a2b 100644
--- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
@@ -27,7 +27,6 @@
namespace OCA\Federation\Tests\BackgroundJob;
use GuzzleHttp\Exception\ConnectException;
-use GuzzleHttp\Ring\Exception\RingException;
use OCA\Federation\BackgroundJob\RequestSharedSecret;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Http;
@@ -279,40 +278,4 @@ class RequestSharedSecretTest extends TestCase {
$this->invokePrivate($this->requestSharedSecret, 'run', [$argument]);
$this->assertTrue($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
}
-
- public function testRunRingException() {
- $target = 'targetURL';
- $source = 'sourceURL';
- $token = 'token';
-
- $argument = ['url' => $target, 'token' => $token];
-
- $this->timeFactory->method('getTime')->willReturn(42);
-
- $this->urlGenerator
- ->expects($this->once())
- ->method('getAbsoluteURL')
- ->with('/')
- ->willReturn($source);
-
- $this->httpClient
- ->expects($this->once())
- ->method('post')
- ->with(
- $target . '/ocs/v2.php/apps/federation/api/v1/request-shared-secret',
- [
- 'body' =>
- [
- 'url' => $source,
- 'token' => $token,
- 'format' => 'json',
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- )->willThrowException($this->createMock(RingException::class));
-
- $this->invokePrivate($this->requestSharedSecret, 'run', [$argument]);
- $this->assertTrue($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
- }
}