From 40ad62306d4dd8cf8d96446877182c1cf4a9bef0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 27 Sep 2016 15:19:39 +0200 Subject: [PATCH] Use the same URL everywhere Signed-off-by: Joas Schilling --- config/config.sample.php | 2 +- lib/private/updater.php | 2 +- tests/lib/updater.php | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index 538dd9d7a6e..8f4d2ef9304 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -498,7 +498,7 @@ $CONFIG = array( /** * URL that Nextcloud should use to look for updates */ -'updater.server.url' => 'https://updates.nextcloud.com/update-server/', +'updater.server.url' => 'https://updates.nextcloud.com/updater_server/', /** * Release channel to use for updates diff --git a/lib/private/updater.php b/lib/private/updater.php index 2837e60a6fa..c1dbca24fe7 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -144,7 +144,7 @@ class Updater extends BasicEmitter { return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true); } - $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/update-server/'); + $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/updater_server/'); $this->config->setAppValue('core', 'lastupdatedat', time()); diff --git a/tests/lib/updater.php b/tests/lib/updater.php index 4e8b9d19651..e106078f766 100644 --- a/tests/lib/updater.php +++ b/tests/lib/updater.php @@ -223,8 +223,8 @@ class UpdaterTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') - ->willReturn('https://updates.nextcloud.com/update-server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -255,7 +255,7 @@ class UpdaterTest extends \Test\TestCase { $this->httpHelper ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check()); @@ -270,8 +270,8 @@ class UpdaterTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') - ->willReturn('https://updates.nextcloud.com/update-server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -295,7 +295,7 @@ class UpdaterTest extends \Test\TestCase { $this->httpHelper ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/')) ->will($this->returnValue($updateXml)); $this->assertSame([], $this->updater->check()); @@ -318,8 +318,8 @@ class UpdaterTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') - ->willReturn('https://updates.nextcloud.com/update-server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -346,7 +346,7 @@ class UpdaterTest extends \Test\TestCase { $this->httpHelper ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check()); @@ -363,8 +363,8 @@ class UpdaterTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') - ->willReturn('https://updates.nextcloud.com/update-server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -388,7 +388,7 @@ class UpdaterTest extends \Test\TestCase { $this->httpHelper ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check());