Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing slash on path to CollectionAO.getPermissionForCollection() throws FileNotFoundException #37

Closed
deardooley opened this issue Jul 28, 2014 · 0 comments

Comments

@deardooley
Copy link

Seeing discrepancy in behavior based on whether or not the path has a trailing slash.

@Test
public void testGetPermissionForCollectionDoesNotThrowExceptionOnTrailingSlash() 
throws Exception 
{
    String pathWithNoSlash = testingPropertiesHelper
            .buildIRODSCollectionAbsolutePathFromTestProperties(
                    testingProperties, IRODS_TEST_SUBDIR_PATH);

     String pathWithTrailingSlash = testingPropertiesHelper
            .buildIRODSCollectionAbsolutePathFromTestProperties(
                    testingProperties, IRODS_TEST_SUBDIR_PATH + "/");

    // now put the file
    IRODSAccount irodsAccount = testingPropertiesHelper
            .buildIRODSAccountFromTestProperties(testingProperties);

    CollectionAO collectionAO = irodsFileSystem
            .getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);

    try {
        collectionAO.getPermissionForCollection(pathWithNoSlash, irodsAccount.getUserName(), irodsAccount.getZone());
    } catch (Exception e) {
        Assert.fail("This should never happen", e);
    }

    try {
        collectionAO.getPermissionForCollection(pathWithTrailingSlash, irodsAccount.getUserName(), irodsAccount.getZone());
    } catch (FileNotFoundException e) {
        Assert.fail("Trailing slash should resolve to parent without throwing FileNotFoundException", e);
    } catch (Exception e) {
        Assert.fail("This should never happen", e);
    }
}

@michael-conway michael-conway modified the milestones: idrop for jargon 4.0.2 release support - 4.0.2.1, consortium-tls 4.0.2.2 Feb 21, 2015
@michael-conway michael-conway modified the milestones: Maintenance release 4.0.2.2 includes iRODS 4.1, consortium-tls 4.0.2.3, 4.0.2.3 with iRODS 4.1 Apr 21, 2015
@michael-conway michael-conway modified the milestones: 4.0.2.3 with iRODS 4.1, Performance enhancements for streams and put/get - 4.0.2.4 Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants