Example #1
0
def testReceivingServerActionCheckTargetFileNames():
    logger = Logger()
    files = ["/mnt/data", "/etc/passwd", "/etc/something/nonsence", "/tmp"]
    options = dict(port=1000, gridUserDest="someuser", destFiles=files)
    a = ReceivingServerAction("some_id", options)
    logger.info("%s - checking presence of files at target location ..." %
                a.__class__.__name__)
    r = a._checkTargetFileNames(files)
    logger.debug("Results:\n%s" % r)
    expected = \
        """    exists  True: /mnt/data
    exists False: /mnt/.data
    exists  True: /etc/passwd
    exists False: /etc/.passwd
    exists False: /etc/something/nonsence
    exists False: /etc/something/.nonsence
    exists  True: /tmp
    exists False: /.tmp
"""
    assert r == expected
Example #2
0
def testReceivingServerActionCheckTargetFileNames():
    logger = Logger()
    files = ["/mnt/data", "/etc/passwd", "/etc/something/nonsence", "/tmp"]
    options = dict(port=1000, gridUserDest="someuser", destFiles=files)
    a = ReceivingServerAction("some_id", options)
    logger.info("%s - checking presence of files at target location ..." %
                a.__class__.__name__)
    r = a._checkTargetFileNames(files)
    logger.debug("Results:\n%s" % r)
    expected = \
        """    exists  True: /mnt/data
    exists False: /mnt/.data
    exists  True: /etc/passwd
    exists False: /etc/.passwd
    exists False: /etc/something/nonsence
    exists False: /etc/something/.nonsence
    exists  True: /tmp
    exists False: /.tmp
"""
    assert r == expected