Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change updater URL
  • Loading branch information
nickvergessen committed Sep 8, 2016
commit 407198245432ce26fd0c2f7ae6ae23be6727600a
2 changes: 1 addition & 1 deletion config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
/**
* 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/',

/**
* Release channel to use for updates
Expand Down
2 changes: 1 addition & 1 deletion lib/private/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function check() {
return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
}

$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.org/server/');
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/update-server/');

$this->config->setAppValue('core', 'lastupdatedat', time());

Expand Down
24 changes: 12 additions & 12 deletions tests/lib/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public function testCheckWithoutUpdateUrl() {
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('updater.server.url', 'https://updates.nextcloud.org/server/')
->willReturn('https://updates.nextcloud.org/server/');
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
->willReturn('https://updates.nextcloud.com/update-server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
Expand Down Expand Up @@ -253,7 +253,7 @@ public function testCheckWithoutUpdateUrl() {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
->will($this->returnValue($updateXml));

$this->assertSame($expectedResult, $this->updater->check());
Expand All @@ -268,8 +268,8 @@ public function testCheckWithInvalidXml() {
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('updater.server.url', 'https://updates.nextcloud.org/server/')
->willReturn('https://updates.nextcloud.org/server/');
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
->willReturn('https://updates.nextcloud.com/update-server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
Expand All @@ -293,7 +293,7 @@ public function testCheckWithInvalidXml() {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
->will($this->returnValue($updateXml));

$this->assertSame([], $this->updater->check());
Expand All @@ -315,8 +315,8 @@ public function testCheckWithEmptyValidXmlResponse() {
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('updater.server.url', 'https://updates.nextcloud.org/server/')
->willReturn('https://updates.nextcloud.org/server/');
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
->willReturn('https://updates.nextcloud.com/update-server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
Expand All @@ -342,7 +342,7 @@ public function testCheckWithEmptyValidXmlResponse() {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
->will($this->returnValue($updateXml));

$this->assertSame($expectedResult, $this->updater->check());
Expand All @@ -359,8 +359,8 @@ public function testCheckWithEmptyInvalidXmlResponse() {
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('updater.server.url', 'https://updates.nextcloud.org/server/')
->willReturn('https://updates.nextcloud.org/server/');
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
->willReturn('https://updates.nextcloud.com/update-server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
Expand All @@ -384,7 +384,7 @@ public function testCheckWithEmptyInvalidXmlResponse() {
$this->httpHelper
->expects($this->once())
->method('getUrlContent')
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
->will($this->returnValue($updateXml));

$this->assertSame($expectedResult, $this->updater->check());
Expand Down