From 6b5e05cc6734ba28918913a51dc316c2dc0c759f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 16 Aug 2007 17:03:50 -0700 Subject: [PATCH] test_system.py: verify that we can replace files in place --- src/allmydata/test/test_system.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index c369dcc1..82a6c6fa 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -576,6 +576,12 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase): d.addCallback(lambda res: self.GET("vdrive/global/subdir3/new.txt")) d.addCallback(self.failUnlessEqual, "new.txt contents") + # can we replace files in place? + d.addCallback(lambda res: self.PUT("vdrive/global/subdir3/new.txt", + "NEWER contents")) + d.addCallback(lambda res: self.GET("vdrive/global/subdir3/new.txt")) + d.addCallback(self.failUnlessEqual, "NEWER contents") + # TODO: mangle the second segment of a file, to test errors that # occur after we've already sent some good data, which uses a # different error path. -- 2.45.2