From 280a4520556af5502fe06faf00f9dcfa3aadc590 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 8 Sep 2016 12:20:29 +0200 Subject: [PATCH] Change updater URL --- config/config.sample.php | 2 +- lib/private/Updater/VersionCheck.php | 2 +- tests/lib/Updater/VersionCheckTest.php | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index d761ae92c2..d706b4321b 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.org/server/', +'updater.server.url' => 'https://updates.nextcloud.com/update-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 a4416986f0..021abc95a5 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/server/'); + $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/update-server/'); $this->config->setAppValue('core', 'lastupdatedat', time()); diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index 99245b5801..7517ab321a 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -91,8 +91,8 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/server/') - ->willReturn('https://updates.nextcloud.com/server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -122,7 +122,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check()); @@ -137,8 +137,8 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/server/') - ->willReturn('https://updates.nextcloud.com/server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -162,7 +162,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) ->will($this->returnValue($updateXml)); $this->assertSame([], $this->updater->check()); @@ -184,8 +184,8 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/server/') - ->willReturn('https://updates.nextcloud.com/server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -211,7 +211,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check()); @@ -228,8 +228,8 @@ class VersionCheckTest extends \Test\TestCase { $this->config ->expects($this->at(1)) ->method('getSystemValue') - ->with('updater.server.url', 'https://updates.nextcloud.com/server/') - ->willReturn('https://updates.nextcloud.com/server/'); + ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/') + ->willReturnArgument(1); $this->config ->expects($this->at(2)) ->method('setAppValue') @@ -253,7 +253,7 @@ class VersionCheckTest extends \Test\TestCase { $this->updater ->expects($this->once()) ->method('getUrlContent') - ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/')) + ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/')) ->will($this->returnValue($updateXml)); $this->assertSame($expectedResult, $this->updater->check());