commit
519281caca
|
@ -2,4 +2,4 @@ PACKAGE_NAME=realm-js
|
|||
VERSION=2.0.8
|
||||
REALM_CORE_VERSION=4.0.2
|
||||
REALM_SYNC_VERSION=2.1.6
|
||||
REALM_OBJECT_SERVER_VERSION=2.0.0-rc.10
|
||||
REALM_OBJECT_SERVER_VERSION=2.0.21
|
|
@ -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: $!\"
|
||||
sh scripts/download-object-server.sh && export ROS_SKIP_PROMPTS=true && ./node_modules/.bin/ros start --data realm-object-server-data && echo \"Server PID: $!\"
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue