mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Feature #862: Polish a bit the chmod methods in Java OCA
This commit is contained in:
1 parent
bd4df10204
commit
d698d4fc63
7 files changed
+243
-12
No files matched your search
@@ -187,6 +187,45 @@ public class TemplateTest
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_M").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_A").equals("0") );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chmod_octet()
|
||||
{
|
||||
res = template.info();
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
res = template.chmod(640);
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
res = template.info();
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_M").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_A").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_M").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_A").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_U").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_M").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_A").equals("0") );
|
||||
|
||||
res = template.chmod("147");
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
res = template.info();
|
||||
assertTrue( !res.isError() );
|
||||
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_U").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_M").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OWNER_A").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_M").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/GROUP_A").equals("0") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_U").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_M").equals("1") );
|
||||
assertTrue( template.xpath("PERMISSIONS/OTHER_A").equals("1") );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void attributes()
|
||||
|
||||
Reference in new issue
Block a user