we don't need to remove the job manually here, even if we ask once more the other server will decline and the background job will be removed

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/5923/head
Bjoern Schiessle 9 years ago committed by Roeland Jago Douma
parent 80c08e8fd0
commit 3ffff08819
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 9
      apps/federation/lib/Controller/OCSAuthAPIController.php
  2. 2
      apps/federation/tests/Controller/OCSAuthAPIControllerTest.php

@ -149,15 +149,6 @@ class OCSAuthAPIController extends OCSController{
throw new OCSForbiddenException();
}
// we ask for the shared secret so we no longer have to ask the other server
// to request the shared secret
$this->jobList->remove('OCA\Federation\BackgroundJob\RequestSharedSecret',
[
'url' => $url,
'token' => $localToken
]
);
$this->jobList->add(
'OCA\Federation\BackgroundJob\GetSharedSecret',
[

@ -114,8 +114,6 @@ class OCSAuthAPIControllerTest extends TestCase {
if ($ok) {
$this->jobList->expects($this->once())->method('add')
->with('OCA\Federation\BackgroundJob\GetSharedSecret', ['url' => $url, 'token' => $token, 'created' => $this->currentTime]);
$this->jobList->expects($this->once())->method('remove')
->with('OCA\Federation\BackgroundJob\RequestSharedSecret', ['url' => $url, 'token' => $localToken]);
} else {
$this->jobList->expects($this->never())->method('add');
$this->jobList->expects($this->never())->method('remove');

Loading…
Cancel
Save