mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Feature #862: Update Java OCA to use the new permissions
This commit is contained in:
1 parent
9e586e8ef0
commit
bd4df10204
12 files changed
+473
-173
No files matched your search
@@ -149,7 +149,7 @@ public class TemplateTest
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
template.info();
|
||||
assertTrue( template.isPublic() );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_U").equals("1") );
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -159,9 +159,35 @@ public class TemplateTest
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
template.info();
|
||||
assertTrue( !template.isPublic() );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_U").equals("0") );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chmod()
|
||||
{
|
||||
res = template.info();
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
String owner_a = template.xpath("PERMISSIONS/OWNER_A");
|
||||
String group_a = template.xpath("PERMISSIONS/GROUP_A");
|
||||
|
||||
res = template.chmod(0, 1, -1, 1, 0, -1, 1, 1, 0);
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
res = template.info();
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_U").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_M").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_A").equals(owner_a) );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_M").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_A").equals(group_a) );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_M").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_A").equals("0") );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void attributes()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user