Ticket #641: small_symlink_test.patch

File small_symlink_test.patch, 2.4 KB (added by azazel, at 2009-02-25T01:09:49Z)
  • src/allmydata/scripts/tahoe_backup.py

    diff -rN -u old-tahoe_darcs/src/allmydata/scripts/tahoe_backup.py new-tahoe_darcs/src/allmydata/scripts/tahoe_backup.py
    old new  
    267267            elif os.path.isfile(childpath):
    268268                newfilecap, metadata = self.upload(childpath)
    269269                newdircontents[child] = ("filenode", newfilecap, metadata)
    270             elif os.path.islink(childpath):
    271                 print >>self.options.stderr, "warning: symbolic links are not yet supported, ignoring '%s'" % childpath
    272                 break
     270#             elif os.path.islink(childpath):
     271#                 print >>self.options.stderr, "warning: symbolic links are not yet supported, ignoring '%s'" % childpath
     272#                 break
    273273            else:
    274274                if skip_problematic:
    275275                    self.problematic_skipped += 1
  • src/allmydata/test/test_cli.py

    diff -rN -u old-tahoe_darcs/src/allmydata/test/test_cli.py new-tahoe_darcs/src/allmydata/test/test_cli.py
    old new  
    10111011        self.set_up_grid()
    10121012
    10131013        # create a small local directory with one file and a symlink
    1014         source = os.path.join(self.basedir, "home")
    1015         self.writeto("foo.txt", "foo")
    1016         os.symlink(os.path.join(source, "foo.txt"), os.path.join(source, "foo2.txt"))
     1014        #source = os.path.join(self.basedir, "home")
     1015        #self.writeto("foo.txt", "foo")
     1016        #os.symlink(os.path.join(source, "foo.txt"), os.path.join(source, "foo2.txt"))
     1017        os.system('mkdir -p /tmp/test')
     1018        f = file('/tmp/test/foo.txt', 'w')
     1019        f.write('top secret')
     1020        f.close()
     1021        os.symlink('/tmp/test/foo.txt', '/tmp/test/foo2.txt')
    10171022
    10181023        d = self.do_cli("create-alias", "tahoe")
    10191024
    1020         d.addCallback(lambda res: self.do_cli("backup", "--no-backupdb", source, "tahoe:test"))
     1025        d.addCallback(lambda res: self.do_cli("backup", "--no-backupdb", '/tmp/test', "tahoe:test"))
    10211026
    10221027        def _check((rc, out, err)):
    10231028            self.failUnlessEqual(rc, 0)
    10241029            self.failUnless(err.startswith("warning: symbolic links are not yet supported, ignoring '"))
    1025         d.addCallback(_check)
     1030        #d.addCallback(_check)
    10261031
    10271032        return d
    10281033