From 615b69677eeab739db4408c51a5873f31cc51033 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 27 Sep 2016 14:52:22 +0200 Subject: [PATCH] Use the same URL everywhere Signed-off-by: Joas Schilling --- config/config.sample.php | 2 +- lib/private/Updater/VersionCheck.php | 2 +- tests/lib/Updater/VersionCheckTest.php | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index d6680caac18..3aa0f353c59 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -519,7 +519,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/', /** * Is Nextcloud connected to the Internet or running in a closed network? diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index d90990e2791..f66e109fd26 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -59,7 +59,7 @@ class VersionCheck { 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/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index 7e129232edd..c85516c320e 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -94,7 +94,7 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') ->willReturnArgument(1); $this->config ->expects($this->at(2)) @@ -126,7 +126,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->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()); @@ -141,7 +141,7 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') ->willReturnArgument(1); $this->config ->expects($this->at(2)) @@ -166,7 +166,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->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()); @@ -189,7 +189,7 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') ->willReturnArgument(1); $this->config ->expects($this->at(2)) @@ -217,7 +217,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->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()); @@ -234,7 +234,7 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/') ->willReturnArgument(1); $this->config ->expects($this->at(2)) @@ -259,7 +259,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->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());