From 3ffff08819365e6a38e0c7d381343f59bc2fc89c Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 28 Jul 2017 15:49:46 +0200 Subject: 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 --- apps/federation/lib/Controller/OCSAuthAPIController.php | 9 --------- apps/federation/tests/Controller/OCSAuthAPIControllerTest.php | 2 -- 2 files changed, 11 deletions(-) diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php index a2a608babac..f09f0807bd4 100644 --- a/apps/federation/lib/Controller/OCSAuthAPIController.php +++ b/apps/federation/lib/Controller/OCSAuthAPIController.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', [ diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index 41bfd70bfc5..d0529583309 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -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'); -- cgit v1.2.3