From 1ff4316d26a052aa528bd833e7edc283803346bc Mon Sep 17 00:00:00 2001 From: blagoev Date: Tue, 14 Nov 2017 11:12:42 +0200 Subject: [PATCH 1/5] use ROS 2.0 final --- dependencies.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.list b/dependencies.list index ca66a857..8bb00cc3 100644 --- a/dependencies.list +++ b/dependencies.list @@ -2,4 +2,4 @@ PACKAGE_NAME=realm-js VERSION=2.0.6 REALM_CORE_VERSION=4.0.2 REALM_SYNC_VERSION=2.1.2 -REALM_OBJECT_SERVER_VERSION=2.0.0-rc.10 +REALM_OBJECT_SERVER_VERSION=2.0.0 From 504782e46c77794d292eefd5c2c655e9ccb5f04b Mon Sep 17 00:00:00 2001 From: blagoev Date: Tue, 14 Nov 2017 11:42:31 +0200 Subject: [PATCH 2/5] fix env variable name --- scripts/download_and_start_server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download_and_start_server.sh b/scripts/download_and_start_server.sh index b49a9568..25995da8 100755 --- a/scripts/download_and_start_server.sh +++ b/scripts/download_and_start_server.sh @@ -3,4 +3,4 @@ set -o pipefail set -e echo "Downloading and starting ROS. Current directory: " $(pwd) -sh scripts/download-object-server.sh && export ROS_SKIP_PROMTS=true && ./node_modules/.bin/ros start --data realm-object-server-data && echo \"Server PID: $!\" \ No newline at end of file +sh scripts/download-object-server.sh && export ROS_SKIP_PROMPTS=true && ./node_modules/.bin/ros start --data realm-object-server-data && echo \"Server PID: $!\" From 87166aefa212537db40463d345072ce6c9a0e855 Mon Sep 17 00:00:00 2001 From: blagoev Date: Tue, 14 Nov 2017 11:43:02 +0200 Subject: [PATCH 3/5] fix env variable name --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 1fc510b6..0eea3e7d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -55,7 +55,7 @@ start_server() { #enabled ROS logging #sh ./object-server-for-testing/start-object-server.command & - export ROS_SKIP_PROMTS=true && ./node_modules/.bin/ros start --data realm-object-server-data & + export ROS_SKIP_PROMPTS=true && ./node_modules/.bin/ros start --data realm-object-server-data & SERVER_PID=$! echo ROS PID: ${SERVER_PID} } From 2ae74feee13e5a30d14c6863644c2dce75a0f512 Mon Sep 17 00:00:00 2001 From: blagoev Date: Fri, 17 Nov 2017 13:00:44 +0200 Subject: [PATCH 4/5] update latest version --- dependencies.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.list b/dependencies.list index 8bb00cc3..993e4357 100644 --- a/dependencies.list +++ b/dependencies.list @@ -2,4 +2,4 @@ PACKAGE_NAME=realm-js VERSION=2.0.6 REALM_CORE_VERSION=4.0.2 REALM_SYNC_VERSION=2.1.2 -REALM_OBJECT_SERVER_VERSION=2.0.0 +REALM_OBJECT_SERVER_VERSION=2.0.21 From 7f75b72a098ecfa9cb0b7e5210b1789220cb8f39 Mon Sep 17 00:00:00 2001 From: blagoev Date: Mon, 20 Nov 2017 13:26:47 +0200 Subject: [PATCH 5/5] fix permission tests --- tests/js/permission-tests.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/js/permission-tests.js b/tests/js/permission-tests.js index bc894a0f..4379e494 100644 --- a/tests/js/permission-tests.js +++ b/tests/js/permission-tests.js @@ -58,20 +58,20 @@ function repeatUntil(fn, predicate) { } module.exports = { - // testApplyAndGetGrantedPermissions() { - // return createUsersWithTestRealms(1) - // .then(([user]) => { - // return user.applyPermissions({ userId: '*' }, `/${user.identity}/test`, 'read') - // .then(repeatUntil(() => user.getGrantedPermissions('any'), - // permissions => permissions.length > 1)) - // .then(permissions => { - // TestCase.assertEqual(permissions[1].path, `/${user.identity}/test`); - // TestCase.assertEqual(permissions[1].mayRead, true); - // TestCase.assertEqual(permissions[1].mayWrite, false); - // TestCase.assertEqual(permissions[1].mayManage, false); - // }); - // }); - // }, + testApplyAndGetGrantedPermissions() { + return createUsersWithTestRealms(1) + .then(([user]) => { + return user.applyPermissions({ userId: `${user.identity}` }, `/${user.identity}/test`, 'read') + .then(repeatUntil(() => user.getGrantedPermissions('any'), + permissions => permissions.length > 1)) + .then(permissions => { + TestCase.assertEqual(permissions[0].path, `/${user.identity}/test`); + TestCase.assertEqual(permissions[0].mayRead, true); + TestCase.assertEqual(permissions[0].mayWrite, false); + TestCase.assertEqual(permissions[0].mayManage, false); + }); + }); + }, testOfferPermissions() { return createUsersWithTestRealms(2) @@ -85,10 +85,10 @@ module.exports = { .then(repeatUntil(() => user2.getGrantedPermissions('any'), permissions => permissions.length > 1)) .then(permissions => { - TestCase.assertEqual(permissions[1].path, `/${user1.identity}/test`); - TestCase.assertEqual(permissions[1].mayRead, true); - TestCase.assertEqual(permissions[1].mayWrite, false); - TestCase.assertEqual(permissions[1].mayManage, false); + TestCase.assertEqual(permissions[2].path, `/${user1.identity}/test`); + TestCase.assertEqual(permissions[2].mayRead, true); + TestCase.assertEqual(permissions[2].mayWrite, false); + TestCase.assertEqual(permissions[2].mayManage, false); }); }); },