From eccd7cf6548e1ea639aea48cbf7e52e95dc98c11 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 26 Feb 2016 17:02:13 +0100 Subject: reuse the url_hash instead of calculating a new hash for the address book --- apps/federation/tests/lib/dbhandlertest.php | 14 +++++++------- .../tests/lib/syncfederationaddressbookstest.php | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'apps/federation/tests') diff --git a/apps/federation/tests/lib/dbhandlertest.php b/apps/federation/tests/lib/dbhandlertest.php index 6fe5d9ea8ef..ee28da8e02a 100644 --- a/apps/federation/tests/lib/dbhandlertest.php +++ b/apps/federation/tests/lib/dbhandlertest.php @@ -89,9 +89,9 @@ class DbHandlerTest extends TestCase { public function dataTestAddServer() { return [ - ['http://owncloud.org', 'http://owncloud.org', md5('owncloud.org')], - ['https://owncloud.org', 'https://owncloud.org', md5('owncloud.org')], - ['http://owncloud.org/', 'http://owncloud.org', md5('owncloud.org')], + ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')], + ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')], + ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')], ]; } @@ -233,10 +233,10 @@ class DbHandlerTest extends TestCase { public function dataTestHash() { return [ - ['server1', md5('server1')], - ['http://server1', md5('server1')], - ['https://server1', md5('server1')], - ['http://server1/', md5('server1')], + ['server1', sha1('server1')], + ['http://server1', sha1('server1')], + ['https://server1', sha1('server1')], + ['http://server1/', sha1('server1')], ]; } diff --git a/apps/federation/tests/lib/syncfederationaddressbookstest.php b/apps/federation/tests/lib/syncfederationaddressbookstest.php index 770896535fa..9290bad8bd6 100644 --- a/apps/federation/tests/lib/syncfederationaddressbookstest.php +++ b/apps/federation/tests/lib/syncfederationaddressbookstest.php @@ -19,6 +19,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { willReturn([ [ 'url' => 'https://cloud.drop.box', + 'url_hash' => 'sha1', 'shared_secret' => 'iloveowncloud', 'sync_token' => '0' ] @@ -47,6 +48,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { willReturn([ [ 'url' => 'https://cloud.drop.box', + 'url_hash' => 'sha1', 'shared_secret' => 'iloveowncloud', 'sync_token' => '0' ] -- cgit v1.2.3