Merge pull request #1489 from realm/use-ros2.0-final

use ROS 2.0 final
This commit is contained in:
blagoev 2017-11-20 16:04:38 +02:00 committed by GitHub
commit 519281caca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 21 deletions

View File

@ -2,4 +2,4 @@ PACKAGE_NAME=realm-js
VERSION=2.0.8 VERSION=2.0.8
REALM_CORE_VERSION=4.0.2 REALM_CORE_VERSION=4.0.2
REALM_SYNC_VERSION=2.1.6 REALM_SYNC_VERSION=2.1.6
REALM_OBJECT_SERVER_VERSION=2.0.0-rc.10 REALM_OBJECT_SERVER_VERSION=2.0.21

View File

@ -3,4 +3,4 @@
set -o pipefail set -o pipefail
set -e set -e
echo "Downloading and starting ROS. Current directory: " $(pwd) 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: $!\" sh scripts/download-object-server.sh && export ROS_SKIP_PROMPTS=true && ./node_modules/.bin/ros start --data realm-object-server-data && echo \"Server PID: $!\"

View File

@ -55,7 +55,7 @@ start_server() {
#enabled ROS logging #enabled ROS logging
#sh ./object-server-for-testing/start-object-server.command & #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=$! SERVER_PID=$!
echo ROS PID: ${SERVER_PID} echo ROS PID: ${SERVER_PID}
} }

View File

@ -58,20 +58,20 @@ function repeatUntil(fn, predicate) {
} }
module.exports = { module.exports = {
// testApplyAndGetGrantedPermissions() { testApplyAndGetGrantedPermissions() {
// return createUsersWithTestRealms(1) return createUsersWithTestRealms(1)
// .then(([user]) => { .then(([user]) => {
// return user.applyPermissions({ userId: '*' }, `/${user.identity}/test`, 'read') return user.applyPermissions({ userId: `${user.identity}` }, `/${user.identity}/test`, 'read')
// .then(repeatUntil(() => user.getGrantedPermissions('any'), .then(repeatUntil(() => user.getGrantedPermissions('any'),
// permissions => permissions.length > 1)) permissions => permissions.length > 1))
// .then(permissions => { .then(permissions => {
// TestCase.assertEqual(permissions[1].path, `/${user.identity}/test`); TestCase.assertEqual(permissions[0].path, `/${user.identity}/test`);
// TestCase.assertEqual(permissions[1].mayRead, true); TestCase.assertEqual(permissions[0].mayRead, true);
// TestCase.assertEqual(permissions[1].mayWrite, false); TestCase.assertEqual(permissions[0].mayWrite, false);
// TestCase.assertEqual(permissions[1].mayManage, false); TestCase.assertEqual(permissions[0].mayManage, false);
// }); });
// }); });
// }, },
testOfferPermissions() { testOfferPermissions() {
return createUsersWithTestRealms(2) return createUsersWithTestRealms(2)
@ -85,10 +85,10 @@ module.exports = {
.then(repeatUntil(() => user2.getGrantedPermissions('any'), .then(repeatUntil(() => user2.getGrantedPermissions('any'),
permissions => permissions.length > 1)) permissions => permissions.length > 1))
.then(permissions => { .then(permissions => {
TestCase.assertEqual(permissions[1].path, `/${user1.identity}/test`); TestCase.assertEqual(permissions[2].path, `/${user1.identity}/test`);
TestCase.assertEqual(permissions[1].mayRead, true); TestCase.assertEqual(permissions[2].mayRead, true);
TestCase.assertEqual(permissions[1].mayWrite, false); TestCase.assertEqual(permissions[2].mayWrite, false);
TestCase.assertEqual(permissions[1].mayManage, false); TestCase.assertEqual(permissions[2].mayManage, false);
}); });
}); });
}, },