Package org.apache.hadoop.fs.shell.find

Examples of org.apache.hadoop.fs.shell.find.Perm.initialise()


  @Test
  public void applyOctalExact() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "123");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
View Full Code Here


  @Test
  public void applyOctalMask() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "-123");
    perm.initialise(new FindOptions());

    assertEquals(Result.PASS, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
View Full Code Here

  @Test
  public void applySymbolicExact() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "u=x,g=w,o=wx");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
View Full Code Here

  @Test
  public void applySymbolicMask() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "-u=x,g=w,o=wx");
    perm.initialise(new FindOptions());

    assertEquals(Result.PASS, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
View Full Code Here

  @Test
  public void applySymbolicComplex() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "u=xrw,g=x,o=wx,u-rw,g+w,g-x");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.