1 | 2 patches for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk: |
---|
2 | |
---|
3 | Sun Oct 2 05:00:36 BST 2011 david-sarah@jacaranda.org |
---|
4 | * Tests for ref #1552 |
---|
5 | |
---|
6 | Sun Oct 2 05:03:32 BST 2011 david-sarah@jacaranda.org |
---|
7 | * test_web.py: minor cleanups, mainly to make the first argument to shouldFail tests consistent |
---|
8 | |
---|
9 | New patches: |
---|
10 | |
---|
11 | [Tests for ref #1552 |
---|
12 | david-sarah@jacaranda.org**20111002040036 |
---|
13 | Ignore-this: abdc5c39d90ea7f314834fff7ecd6784 |
---|
14 | ] { |
---|
15 | hunk ./src/allmydata/test/test_web.py 1112 |
---|
16 | # this should get us a few segments of an MDMF mutable file, |
---|
17 | # which we can then test for. |
---|
18 | contents = self.NEWFILE_CONTENTS * 300000 |
---|
19 | - d = self.PUT("/uri?mutable=true&mutable-type=mdmf", |
---|
20 | + d = self.PUT("/uri?format=mdmf", |
---|
21 | contents) |
---|
22 | def _got_filecap(filecap): |
---|
23 | self.failUnless(filecap.startswith("URI:MDMF")) |
---|
24 | hunk ./src/allmydata/test/test_web.py 1124 |
---|
25 | |
---|
26 | def test_PUT_NEWFILEURL_unlinked_sdmf(self): |
---|
27 | contents = self.NEWFILE_CONTENTS * 300000 |
---|
28 | - d = self.PUT("/uri?mutable=true&mutable-type=sdmf", |
---|
29 | + d = self.PUT("/uri?format=sdmf", |
---|
30 | contents) |
---|
31 | d.addCallback(lambda filecap: self.GET("/uri/%s?t=json" % filecap)) |
---|
32 | d.addCallback(lambda json: self.failUnlessIn("sdmf", json)) |
---|
33 | hunk ./src/allmydata/test/test_web.py 1130 |
---|
34 | return d |
---|
35 | |
---|
36 | - def test_PUT_NEWFILEURL_unlinked_bad_mutable_type(self): |
---|
37 | + def test_PUT_NEWFILEURL_unlinked_bad_format(self): |
---|
38 | contents = self.NEWFILE_CONTENTS * 300000 |
---|
39 | hunk ./src/allmydata/test/test_web.py 1132 |
---|
40 | - return self.shouldHTTPError("test bad mutable type", |
---|
41 | - 400, "Bad Request", "Unknown type: foo", |
---|
42 | - self.PUT, "/uri?mutable=true&mutable-type=foo", |
---|
43 | + return self.shouldHTTPError("PUT_NEWFILEURL_unlinked_bad_format", |
---|
44 | + 400, "Bad Request", "Unknown format: foo", |
---|
45 | + self.PUT, "/uri?format=foo", |
---|
46 | contents) |
---|
47 | |
---|
48 | def test_PUT_NEWFILEURL_range_bad(self): |
---|
49 | hunk ./src/allmydata/test/test_web.py 1268 |
---|
50 | return d |
---|
51 | |
---|
52 | def test_GET_FILEURL_json_mutable_type(self): |
---|
53 | - # The JSON should include mutable-type, which says whether the |
---|
54 | + # The JSON should include format, which says whether the |
---|
55 | # file is SDMF or MDMF |
---|
56 | hunk ./src/allmydata/test/test_web.py 1270 |
---|
57 | - d = self.PUT("/uri?mutable=true&mutable-type=mdmf", |
---|
58 | + d = self.PUT("/uri?format=mdmf", |
---|
59 | self.NEWFILE_CONTENTS * 300000) |
---|
60 | d.addCallback(lambda filecap: self.GET("/uri/%s?t=json" % filecap)) |
---|
61 | def _got_json(json, version): |
---|
62 | hunk ./src/allmydata/test/test_web.py 1279 |
---|
63 | data = data[1] |
---|
64 | assert isinstance(data, dict) |
---|
65 | |
---|
66 | - self.failUnlessIn("mutable-type", data) |
---|
67 | - self.failUnlessEqual(data['mutable-type'], version) |
---|
68 | + self.failUnlessIn("format", data) |
---|
69 | + self.failUnlessEqual(data["format"], version) |
---|
70 | |
---|
71 | d.addCallback(_got_json, "mdmf") |
---|
72 | # Now make an SDMF file and check that it is reported correctly. |
---|
73 | hunk ./src/allmydata/test/test_web.py 1285 |
---|
74 | d.addCallback(lambda ignored: |
---|
75 | - self.PUT("/uri?mutable=true&mutable-type=sdmf", |
---|
76 | + self.PUT("/uri?format=sdmf", |
---|
77 | self.NEWFILE_CONTENTS * 300000)) |
---|
78 | d.addCallback(lambda filecap: self.GET("/uri/%s?t=json" % filecap)) |
---|
79 | d.addCallback(_got_json, "sdmf") |
---|
80 | hunk ./src/allmydata/test/test_web.py 1535 |
---|
81 | d.addCallback(self.failUnlessIsFooJSON) |
---|
82 | return d |
---|
83 | |
---|
84 | - def test_GET_DIRURL_json_mutable_type(self): |
---|
85 | + def test_GET_DIRURL_json_format(self): |
---|
86 | d = self.PUT(self.public_url + \ |
---|
87 | hunk ./src/allmydata/test/test_web.py 1537 |
---|
88 | - "/foo/sdmf.txt?mutable=true&mutable-type=sdmf", |
---|
89 | + "/foo/sdmf.txt?format=sdmf", |
---|
90 | self.NEWFILE_CONTENTS * 300000) |
---|
91 | d.addCallback(lambda ignored: |
---|
92 | self.PUT(self.public_url + \ |
---|
93 | hunk ./src/allmydata/test/test_web.py 1541 |
---|
94 | - "/foo/mdmf.txt?mutable=true&mutable-type=mdmf", |
---|
95 | + "/foo/mdmf.txt?format=mdmf", |
---|
96 | self.NEWFILE_CONTENTS * 300000)) |
---|
97 | # Now we have an MDMF and SDMF file in the directory. If we GET |
---|
98 | # its JSON, we should see their encodings. |
---|
99 | hunk ./src/allmydata/test/test_web.py 1555 |
---|
100 | kids = data['children'] |
---|
101 | |
---|
102 | mdmf_data = kids['mdmf.txt'][1] |
---|
103 | - self.failUnlessIn("mutable-type", mdmf_data) |
---|
104 | - self.failUnlessEqual(mdmf_data['mutable-type'], "mdmf") |
---|
105 | + self.failUnlessIn("format", mdmf_data) |
---|
106 | + self.failUnlessEqual(mdmf_data["format"], "mdmf") |
---|
107 | |
---|
108 | sdmf_data = kids['sdmf.txt'][1] |
---|
109 | hunk ./src/allmydata/test/test_web.py 1559 |
---|
110 | - self.failUnlessIn("mutable-type", sdmf_data) |
---|
111 | - self.failUnlessEqual(sdmf_data['mutable-type'], "sdmf") |
---|
112 | + self.failUnlessIn("format", sdmf_data) |
---|
113 | + self.failUnlessEqual(sdmf_data["format"], "sdmf") |
---|
114 | d.addCallback(_got_json) |
---|
115 | return d |
---|
116 | |
---|
117 | hunk ./src/allmydata/test/test_web.py 1723 |
---|
118 | return d |
---|
119 | |
---|
120 | def test_PUT_NEWDIRURL_mdmf(self): |
---|
121 | - d = self.PUT(self.public_url + "/foo/newdir?t=mkdir&mutable-type=mdmf", "") |
---|
122 | + d = self.PUT(self.public_url + "/foo/newdir?t=mkdir&format=mdmf", "") |
---|
123 | d.addCallback(lambda res: |
---|
124 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
125 | d.addCallback(lambda res: self._foo_node.get(u"newdir")) |
---|
126 | hunk ./src/allmydata/test/test_web.py 1732 |
---|
127 | return d |
---|
128 | |
---|
129 | def test_PUT_NEWDIRURL_sdmf(self): |
---|
130 | - d = self.PUT(self.public_url + "/foo/newdir?t=mkdir&mutable-type=sdmf", |
---|
131 | + d = self.PUT(self.public_url + "/foo/newdir?t=mkdir&format=sdmf", |
---|
132 | "") |
---|
133 | d.addCallback(lambda res: |
---|
134 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
135 | hunk ./src/allmydata/test/test_web.py 1741 |
---|
136 | self.failUnlessEqual(node._node.get_version(), SDMF_VERSION)) |
---|
137 | return d |
---|
138 | |
---|
139 | - def test_PUT_NEWDIRURL_bad_mutable_type(self): |
---|
140 | - return self.shouldHTTPError("test bad mutable type", |
---|
141 | - 400, "Bad Request", "Unknown type: foo", |
---|
142 | - self.PUT, self.public_url + \ |
---|
143 | - "/foo/newdir=?t=mkdir&mutable-type=foo", "") |
---|
144 | + def test_PUT_NEWDIRURL_bad_format(self): |
---|
145 | + return self.shouldHTTPError("PUT_NEWDIRURL_bad_format", |
---|
146 | + 400, "Bad Request", "Unknown format: foo", |
---|
147 | + self.PUT, self.public_url + |
---|
148 | + "/foo/newdir=?t=mkdir&format=foo", "") |
---|
149 | |
---|
150 | def test_POST_NEWDIRURL(self): |
---|
151 | d = self.POST2(self.public_url + "/foo/newdir?t=mkdir", "") |
---|
152 | hunk ./src/allmydata/test/test_web.py 1756 |
---|
153 | return d |
---|
154 | |
---|
155 | def test_POST_NEWDIRURL_mdmf(self): |
---|
156 | - d = self.POST2(self.public_url + "/foo/newdir?t=mkdir&mutable-type=mdmf", "") |
---|
157 | + d = self.POST2(self.public_url + "/foo/newdir?t=mkdir&format=mdmf", "") |
---|
158 | d.addCallback(lambda res: |
---|
159 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
160 | d.addCallback(lambda res: self._foo_node.get(u"newdir")) |
---|
161 | hunk ./src/allmydata/test/test_web.py 1765 |
---|
162 | return d |
---|
163 | |
---|
164 | def test_POST_NEWDIRURL_sdmf(self): |
---|
165 | - d = self.POST2(self.public_url + "/foo/newdir?t=mkdir&mutable-type=sdmf", "") |
---|
166 | + d = self.POST2(self.public_url + "/foo/newdir?t=mkdir&format=sdmf", "") |
---|
167 | d.addCallback(lambda res: |
---|
168 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
169 | d.addCallback(lambda res: self._foo_node.get(u"newdir")) |
---|
170 | hunk ./src/allmydata/test/test_web.py 1773 |
---|
171 | self.failUnlessEqual(node._node.get_version(), SDMF_VERSION)) |
---|
172 | return d |
---|
173 | |
---|
174 | - def test_POST_NEWDIRURL_bad_mutable_type(self): |
---|
175 | - return self.shouldHTTPError("test bad mutable type", |
---|
176 | - 400, "Bad Request", "Unknown type: foo", |
---|
177 | + def test_POST_NEWDIRURL_bad_format(self): |
---|
178 | + return self.shouldHTTPError("POST_NEWDIRURL_bad_format", |
---|
179 | + 400, "Bad Request", "Unknown format: foo", |
---|
180 | self.POST2, self.public_url + \ |
---|
181 | hunk ./src/allmydata/test/test_web.py 1777 |
---|
182 | - "/foo/newdir?t=mkdir&mutable-type=foo", "") |
---|
183 | + "/foo/newdir?t=mkdir&format=foo", "") |
---|
184 | |
---|
185 | def test_POST_NEWDIRURL_emptyname(self): |
---|
186 | # an empty pathname component (i.e. a double-slash) is disallowed |
---|
187 | hunk ./src/allmydata/test/test_web.py 1791 |
---|
188 | (newkids, caps) = self._create_initial_children() |
---|
189 | query = "/foo/newdir?t=mkdir-with-children" |
---|
190 | if version == MDMF_VERSION: |
---|
191 | - query += "&mutable-type=mdmf" |
---|
192 | + query += "&format=mdmf" |
---|
193 | elif version == SDMF_VERSION: |
---|
194 | hunk ./src/allmydata/test/test_web.py 1793 |
---|
195 | - query += "&mutable-type=sdmf" |
---|
196 | + query += "&format=sdmf" |
---|
197 | else: |
---|
198 | version = SDMF_VERSION # for later |
---|
199 | d = self.POST2(self.public_url + query, |
---|
200 | hunk ./src/allmydata/test/test_web.py 1848 |
---|
201 | def test_POST_NEWDIRURL_initial_children_sdmf(self): |
---|
202 | return self._do_POST_NEWDIRURL_initial_children_test(SDMF_VERSION) |
---|
203 | |
---|
204 | - def test_POST_NEWDIRURL_initial_children_bad_mutable_type(self): |
---|
205 | + def test_POST_NEWDIRURL_initial_children_bad_format(self): |
---|
206 | (newkids, caps) = self._create_initial_children() |
---|
207 | hunk ./src/allmydata/test/test_web.py 1850 |
---|
208 | - return self.shouldHTTPError("test bad mutable type", |
---|
209 | - 400, "Bad Request", "Unknown type: foo", |
---|
210 | + return self.shouldHTTPError("POST_NEWDIRURL_initial_children_bad_format", |
---|
211 | + 400, "Bad Request", "Unknown format: foo", |
---|
212 | self.POST2, self.public_url + \ |
---|
213 | hunk ./src/allmydata/test/test_web.py 1853 |
---|
214 | - "/foo/newdir?t=mkdir-with-children&mutable-type=foo", |
---|
215 | + "/foo/newdir?t=mkdir-with-children&format=foo", |
---|
216 | simplejson.dumps(newkids)) |
---|
217 | |
---|
218 | def test_POST_NEWDIRURL_immutable(self): |
---|
219 | hunk ./src/allmydata/test/test_web.py 1957 |
---|
220 | return d |
---|
221 | |
---|
222 | def test_PUT_NEWDIRURL_mkdirs_mdmf(self): |
---|
223 | - d = self.PUT(self.public_url + "/foo/subdir/newdir?t=mkdir&mutable-type=mdmf", "") |
---|
224 | + d = self.PUT(self.public_url + "/foo/subdir/newdir?t=mkdir&format=mdmf", "") |
---|
225 | d.addCallback(lambda ignored: |
---|
226 | self.failUnlessNodeHasChild(self._foo_node, u"subdir")) |
---|
227 | d.addCallback(lambda ignored: |
---|
228 | hunk ./src/allmydata/test/test_web.py 1975 |
---|
229 | return d |
---|
230 | |
---|
231 | def test_PUT_NEWDIRURL_mkdirs_sdmf(self): |
---|
232 | - d = self.PUT(self.public_url + "/foo/subdir/newdir?t=mkdir&mutable-type=sdmf", "") |
---|
233 | + d = self.PUT(self.public_url + "/foo/subdir/newdir?t=mkdir&format=sdmf", "") |
---|
234 | d.addCallback(lambda ignored: |
---|
235 | self.failUnlessNodeHasChild(self._foo_node, u"subdir")) |
---|
236 | d.addCallback(lambda ignored: |
---|
237 | hunk ./src/allmydata/test/test_web.py 1992 |
---|
238 | self.failUnlessEqual(newdir._node.get_version(), SDMF_VERSION)) |
---|
239 | return d |
---|
240 | |
---|
241 | - def test_PUT_NEWDIRURL_mkdirs_bad_mutable_type(self): |
---|
242 | - return self.shouldHTTPError("test bad mutable type", |
---|
243 | - 400, "Bad Request", "Unknown type: foo", |
---|
244 | + def test_PUT_NEWDIRURL_mkdirs_bad_format(self): |
---|
245 | + return self.shouldHTTPError("PUT_NEWDIRURL_mkdirs_bad_format", |
---|
246 | + 400, "Bad Request", "Unknown format: foo", |
---|
247 | self.PUT, self.public_url + \ |
---|
248 | hunk ./src/allmydata/test/test_web.py 1996 |
---|
249 | - "/foo/subdir/newdir?t=mkdir&mutable-type=foo", |
---|
250 | + "/foo/subdir/newdir?t=mkdir&format=foo", |
---|
251 | "") |
---|
252 | |
---|
253 | def test_DELETE_DIRURL(self): |
---|
254 | hunk ./src/allmydata/test/test_web.py 2244 |
---|
255 | return d |
---|
256 | |
---|
257 | |
---|
258 | - def test_POST_upload_mutable_type_unlinked(self): |
---|
259 | - d = self.POST("/uri?t=upload&mutable=true&mutable-type=sdmf", |
---|
260 | - file=("sdmf.txt", self.NEWFILE_CONTENTS * 300000)) |
---|
261 | - d.addCallback(lambda filecap: self.GET("/uri/%s?t=json" % filecap)) |
---|
262 | - def _got_json(json, version): |
---|
263 | - data = simplejson.loads(json) |
---|
264 | - data = data[1] |
---|
265 | + def test_POST_upload_format_unlinked(self): |
---|
266 | + def _check_upload_unlinked(ign, format, uri_prefix): |
---|
267 | + filename = format + ".txt" |
---|
268 | + d = self.POST("/uri?t=upload&format=" + format, |
---|
269 | + file=(filename, self.NEWFILE_CONTENTS * 300000)) |
---|
270 | + def _got_filecap(filecap): |
---|
271 | + self.failUnless(filecap.startswith(uri_prefix)) |
---|
272 | + return self.GET("/uri/%s?t=json" % filecap) |
---|
273 | + d.addCallback(_got_filecap) |
---|
274 | + def _got_json(json): |
---|
275 | + data = simplejson.loads(json) |
---|
276 | + data = data[1] |
---|
277 | + self.failUnlessIn("format", data) |
---|
278 | + self.failUnlessEqual(data["format"], format) |
---|
279 | + d.addCallback(_got_json) |
---|
280 | |
---|
281 | hunk ./src/allmydata/test/test_web.py 2260 |
---|
282 | - self.failUnlessIn("mutable-type", data) |
---|
283 | - self.failUnlessEqual(data['mutable-type'], version) |
---|
284 | - d.addCallback(_got_json, "sdmf") |
---|
285 | - d.addCallback(lambda ignored: |
---|
286 | - self.POST("/uri?t=upload&mutable=true&mutable-type=mdmf", |
---|
287 | - file=('mdmf.txt', self.NEWFILE_CONTENTS * 300000))) |
---|
288 | - def _got_filecap(filecap): |
---|
289 | - self.failUnless(filecap.startswith("URI:MDMF")) |
---|
290 | - return filecap |
---|
291 | - d.addCallback(_got_filecap) |
---|
292 | - d.addCallback(lambda filecap: self.GET("/uri/%s?t=json" % filecap)) |
---|
293 | - d.addCallback(_got_json, "mdmf") |
---|
294 | + d = defer.succeed(None) |
---|
295 | + d.addCallback(_check_upload_unlinked, "chk", "URI:CHK") |
---|
296 | + d.addCallback(_check_upload_unlinked, "CHK", "URI:CHK") |
---|
297 | + d.addCallback(_check_upload_unlinked, "sdmf", "URI:SSK") |
---|
298 | + d.addCallback(_check_upload_unlinked, "mdmf", "URI:MDMF") |
---|
299 | return d |
---|
300 | |
---|
301 | hunk ./src/allmydata/test/test_web.py 2267 |
---|
302 | - def test_POST_upload_mutable_type_unlinked_bad_mutable_type(self): |
---|
303 | - return self.shouldHTTPError("test bad mutable type", |
---|
304 | - 400, "Bad Request", "Unknown type: foo", |
---|
305 | + def test_POST_upload_bad_format_unlinked(self): |
---|
306 | + return self.shouldHTTPError("POST_upload_bad_format_unlinked", |
---|
307 | + 400, "Bad Request", "Unknown format: foo", |
---|
308 | self.POST, |
---|
309 | hunk ./src/allmydata/test/test_web.py 2271 |
---|
310 | - "/uri?5=upload&mutable=true&mutable-type=foo", |
---|
311 | + "/uri?t=upload&format=foo", |
---|
312 | file=("foo.txt", self.NEWFILE_CONTENTS * 300000)) |
---|
313 | |
---|
314 | hunk ./src/allmydata/test/test_web.py 2274 |
---|
315 | - def test_POST_upload_mutable_type(self): |
---|
316 | - d = self.POST(self.public_url + \ |
---|
317 | - "/foo?t=upload&mutable=true&mutable-type=sdmf", |
---|
318 | - file=("sdmf.txt", self.NEWFILE_CONTENTS * 300000)) |
---|
319 | - fn = self._foo_node |
---|
320 | - def _got_cap(filecap, filename): |
---|
321 | - filenameu = unicode(filename) |
---|
322 | - self.failUnlessURIMatchesRWChild(filecap, fn, filenameu) |
---|
323 | - return self.GET(self.public_url + "/foo/%s?t=json" % filename) |
---|
324 | - def _got_mdmf_cap(filecap): |
---|
325 | - self.failUnless(filecap.startswith("URI:MDMF")) |
---|
326 | - return filecap |
---|
327 | - d.addCallback(_got_cap, "sdmf.txt") |
---|
328 | - def _got_json(json, version): |
---|
329 | - data = simplejson.loads(json) |
---|
330 | - data = data[1] |
---|
331 | + def test_POST_upload_format(self): |
---|
332 | + def _check_upload(ign, format, uri_prefix, fn=None): |
---|
333 | + filename = format + ".txt" |
---|
334 | + d = self.POST(self.public_url + |
---|
335 | + "/foo?t=upload&format=" + format, |
---|
336 | + file=(filename, self.NEWFILE_CONTENTS * 300000)) |
---|
337 | + def _got_filecap(filecap): |
---|
338 | + if fn is not None: |
---|
339 | + filenameu = unicode(filename) |
---|
340 | + self.failUnlessURIMatchesRWChild(filecap, fn, filenameu) |
---|
341 | + self.failUnless(filecap.startswith(uri_prefix)) |
---|
342 | + return self.GET(self.public_url + "/foo/%s?t=json" % filename) |
---|
343 | + d.addCallback(_got_filecap) |
---|
344 | + def _got_json(json): |
---|
345 | + data = simplejson.loads(json) |
---|
346 | + data = data[1] |
---|
347 | + self.failUnlessIn("format", data) |
---|
348 | + self.failUnlessEqual(data["format"], format) |
---|
349 | + d.addCallback(_got_json) |
---|
350 | |
---|
351 | hunk ./src/allmydata/test/test_web.py 2294 |
---|
352 | - self.failUnlessIn("mutable-type", data) |
---|
353 | - self.failUnlessEqual(data['mutable-type'], version) |
---|
354 | - d.addCallback(_got_json, "sdmf") |
---|
355 | - d.addCallback(lambda ignored: |
---|
356 | - self.POST(self.public_url + \ |
---|
357 | - "/foo?t=upload&mutable=true&mutable-type=mdmf", |
---|
358 | - file=("mdmf.txt", self.NEWFILE_CONTENTS * 300000))) |
---|
359 | - d.addCallback(_got_mdmf_cap) |
---|
360 | - d.addCallback(_got_cap, "mdmf.txt") |
---|
361 | - d.addCallback(_got_json, "mdmf") |
---|
362 | + d = defer.succeed(None) |
---|
363 | + d.addCallback(_check_upload, "chk", "URI:CHK") |
---|
364 | + d.addCallback(_check_upload, "sdmf", "URI:SSK", self._foo_node) |
---|
365 | + d.addCallback(_check_upload, "mdmf", "URI:MDMF") |
---|
366 | + d.addCallback(_check_upload, "MDMF", "URI:MDMF") |
---|
367 | return d |
---|
368 | |
---|
369 | hunk ./src/allmydata/test/test_web.py 2301 |
---|
370 | - def test_POST_upload_bad_mutable_type(self): |
---|
371 | - return self.shouldHTTPError("test bad mutable type", |
---|
372 | - 400, "Bad Request", "Unknown type: foo", |
---|
373 | + def test_POST_upload_bad_format(self): |
---|
374 | + return self.shouldHTTPError("POST_upload_bad_format", |
---|
375 | + 400, "Bad Request", "Unknown format: foo", |
---|
376 | self.POST, self.public_url + \ |
---|
377 | hunk ./src/allmydata/test/test_web.py 2305 |
---|
378 | - "/foo?t=upload&mutable=true&mutable-type=foo", |
---|
379 | + "/foo?t=upload&format=foo", |
---|
380 | file=("foo.txt", self.NEWFILE_CONTENTS * 300000)) |
---|
381 | |
---|
382 | def test_POST_upload_mutable(self): |
---|
383 | hunk ./src/allmydata/test/test_web.py 2808 |
---|
384 | return d |
---|
385 | |
---|
386 | def test_POST_mkdir_mdmf(self): |
---|
387 | - d = self.POST(self.public_url + "/foo?t=mkdir&name=newdir&mutable-type=mdmf") |
---|
388 | + d = self.POST(self.public_url + "/foo?t=mkdir&name=newdir&format=mdmf") |
---|
389 | d.addCallback(lambda res: self._foo_node.get(u"newdir")) |
---|
390 | d.addCallback(lambda node: |
---|
391 | self.failUnlessEqual(node._node.get_version(), MDMF_VERSION)) |
---|
392 | hunk ./src/allmydata/test/test_web.py 2815 |
---|
393 | return d |
---|
394 | |
---|
395 | def test_POST_mkdir_sdmf(self): |
---|
396 | - d = self.POST(self.public_url + "/foo?t=mkdir&name=newdir&mutable-type=sdmf") |
---|
397 | + d = self.POST(self.public_url + "/foo?t=mkdir&name=newdir&format=sdmf") |
---|
398 | d.addCallback(lambda res: self._foo_node.get(u"newdir")) |
---|
399 | d.addCallback(lambda node: |
---|
400 | self.failUnlessEqual(node._node.get_version(), SDMF_VERSION)) |
---|
401 | hunk ./src/allmydata/test/test_web.py 2821 |
---|
402 | return d |
---|
403 | |
---|
404 | - def test_POST_mkdir_bad_mutable_type(self): |
---|
405 | - return self.shouldHTTPError("test bad mutable type", |
---|
406 | - 400, "Bad Request", "Unknown type: foo", |
---|
407 | - self.POST, self.public_url + \ |
---|
408 | - "/foo?t=mkdir&name=newdir&mutable-type=foo") |
---|
409 | + def test_POST_mkdir_bad_format(self): |
---|
410 | + return self.shouldHTTPError("POST_mkdir_bad_format", |
---|
411 | + 400, "Bad Request", "Unknown format: foo", |
---|
412 | + self.POST, self.public_url + |
---|
413 | + "/foo?t=mkdir&name=newdir&format=foo") |
---|
414 | |
---|
415 | def test_POST_mkdir_initial_children(self): |
---|
416 | (newkids, caps) = self._create_initial_children() |
---|
417 | hunk ./src/allmydata/test/test_web.py 2843 |
---|
418 | def test_POST_mkdir_initial_children_mdmf(self): |
---|
419 | (newkids, caps) = self._create_initial_children() |
---|
420 | d = self.POST2(self.public_url + |
---|
421 | - "/foo?t=mkdir-with-children&name=newdir&mutable-type=mdmf", |
---|
422 | + "/foo?t=mkdir-with-children&name=newdir&format=mdmf", |
---|
423 | simplejson.dumps(newkids)) |
---|
424 | d.addCallback(lambda res: |
---|
425 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
426 | hunk ./src/allmydata/test/test_web.py 2859 |
---|
427 | def test_POST_mkdir_initial_children_sdmf(self): |
---|
428 | (newkids, caps) = self._create_initial_children() |
---|
429 | d = self.POST2(self.public_url + |
---|
430 | - "/foo?t=mkdir-with-children&name=newdir&mutable-type=sdmf", |
---|
431 | + "/foo?t=mkdir-with-children&name=newdir&format=sdmf", |
---|
432 | simplejson.dumps(newkids)) |
---|
433 | d.addCallback(lambda res: |
---|
434 | self.failUnlessNodeHasChild(self._foo_node, u"newdir")) |
---|
435 | hunk ./src/allmydata/test/test_web.py 2871 |
---|
436 | caps['filecap1']) |
---|
437 | return d |
---|
438 | |
---|
439 | - def test_POST_mkdir_initial_children_bad_mutable_type(self): |
---|
440 | + def test_POST_mkdir_initial_children_bad_format(self): |
---|
441 | (newkids, caps) = self._create_initial_children() |
---|
442 | hunk ./src/allmydata/test/test_web.py 2873 |
---|
443 | - return self.shouldHTTPError("test bad mutable type", |
---|
444 | - 400, "Bad Request", "Unknown type: foo", |
---|
445 | + return self.shouldHTTPError("POST_mkdir_initial_children_bad_format", |
---|
446 | + 400, "Bad Request", "Unknown format: foo", |
---|
447 | self.POST, self.public_url + \ |
---|
448 | hunk ./src/allmydata/test/test_web.py 2876 |
---|
449 | - "/foo?t=mkdir-with-children&name=newdir&mutable-type=foo", |
---|
450 | + "/foo?t=mkdir-with-children&name=newdir&format=foo", |
---|
451 | simplejson.dumps(newkids)) |
---|
452 | |
---|
453 | def test_POST_mkdir_immutable(self): |
---|
454 | hunk ./src/allmydata/test/test_web.py 2936 |
---|
455 | return d |
---|
456 | |
---|
457 | def test_POST_mkdir_no_parentdir_noredirect_mdmf(self): |
---|
458 | - d = self.POST("/uri?t=mkdir&mutable-type=mdmf") |
---|
459 | + d = self.POST("/uri?t=mkdir&format=mdmf") |
---|
460 | def _after_mkdir(res): |
---|
461 | u = uri.from_string(res) |
---|
462 | # Check that this is an MDMF writecap |
---|
463 | hunk ./src/allmydata/test/test_web.py 2945 |
---|
464 | return d |
---|
465 | |
---|
466 | def test_POST_mkdir_no_parentdir_noredirect_sdmf(self): |
---|
467 | - d = self.POST("/uri?t=mkdir&mutable-type=sdmf") |
---|
468 | + d = self.POST("/uri?t=mkdir&format=sdmf") |
---|
469 | def _after_mkdir(res): |
---|
470 | u = uri.from_string(res) |
---|
471 | self.failUnlessIsInstance(u, uri.DirectoryURI) |
---|
472 | hunk ./src/allmydata/test/test_web.py 2952 |
---|
473 | d.addCallback(_after_mkdir) |
---|
474 | return d |
---|
475 | |
---|
476 | - def test_POST_mkdir_no_parentdir_noredirect_bad_mutable_type(self): |
---|
477 | - return self.shouldHTTPError("test bad mutable type", |
---|
478 | - 400, "Bad Request", "Unknown type: foo", |
---|
479 | - self.POST, self.public_url + \ |
---|
480 | - "/uri?t=mkdir&mutable-type=foo") |
---|
481 | + def test_POST_mkdir_no_parentdir_noredirect_bad_format(self): |
---|
482 | + return self.shouldHTTPError("POST_mkdir_no_parentdir_noredirect_bad_format", |
---|
483 | + 400, "Bad Request", "Unknown format: foo", |
---|
484 | + self.POST, self.public_url + |
---|
485 | + "/uri?t=mkdir&format=foo") |
---|
486 | |
---|
487 | def test_POST_mkdir_no_parentdir_noredirect2(self): |
---|
488 | # make sure form-based arguments (as on the welcome page) still work |
---|
489 | hunk ./src/allmydata/test/test_web.py 3573 |
---|
490 | def test_PUT_NEWFILEURL_mdmf(self): |
---|
491 | new_contents = self.NEWFILE_CONTENTS * 300000 |
---|
492 | d = self.PUT(self.public_url + \ |
---|
493 | - "/foo/mdmf.txt?mutable=true&mutable-type=mdmf", |
---|
494 | + "/foo/mdmf.txt?format=mdmf", |
---|
495 | new_contents) |
---|
496 | d.addCallback(lambda ignored: |
---|
497 | self.GET(self.public_url + "/foo/mdmf.txt?t=json")) |
---|
498 | hunk ./src/allmydata/test/test_web.py 3580 |
---|
499 | def _got_json(json): |
---|
500 | data = simplejson.loads(json) |
---|
501 | data = data[1] |
---|
502 | - self.failUnlessIn("mutable-type", data) |
---|
503 | - self.failUnlessEqual(data['mutable-type'], "mdmf") |
---|
504 | + self.failUnlessIn("format", data) |
---|
505 | + self.failUnlessEqual(data["format"], "mdmf") |
---|
506 | self.failUnless(data['rw_uri'].startswith("URI:MDMF")) |
---|
507 | self.failUnless(data['ro_uri'].startswith("URI:MDMF")) |
---|
508 | d.addCallback(_got_json) |
---|
509 | hunk ./src/allmydata/test/test_web.py 3590 |
---|
510 | def test_PUT_NEWFILEURL_sdmf(self): |
---|
511 | new_contents = self.NEWFILE_CONTENTS * 300000 |
---|
512 | d = self.PUT(self.public_url + \ |
---|
513 | - "/foo/sdmf.txt?mutable=true&mutable-type=sdmf", |
---|
514 | + "/foo/sdmf.txt?format=sdmf", |
---|
515 | new_contents) |
---|
516 | d.addCallback(lambda ignored: |
---|
517 | self.GET(self.public_url + "/foo/sdmf.txt?t=json")) |
---|
518 | hunk ./src/allmydata/test/test_web.py 3597 |
---|
519 | def _got_json(json): |
---|
520 | data = simplejson.loads(json) |
---|
521 | data = data[1] |
---|
522 | - self.failUnlessIn("mutable-type", data) |
---|
523 | - self.failUnlessEqual(data['mutable-type'], "sdmf") |
---|
524 | + self.failUnlessIn("format", data) |
---|
525 | + self.failUnlessEqual(data["format"], "sdmf") |
---|
526 | d.addCallback(_got_json) |
---|
527 | return d |
---|
528 | |
---|
529 | hunk ./src/allmydata/test/test_web.py 3602 |
---|
530 | - def test_PUT_NEWFILEURL_bad_mutable_type(self): |
---|
531 | + def test_PUT_NEWFILEURL_bad_format(self): |
---|
532 | new_contents = self.NEWFILE_CONTENTS * 300000 |
---|
533 | hunk ./src/allmydata/test/test_web.py 3604 |
---|
534 | - return self.shouldHTTPError("test bad mutable type", |
---|
535 | - 400, "Bad Request", "Unknown type: foo", |
---|
536 | + return self.shouldHTTPError("PUT_NEWFILEURL_bad_format", |
---|
537 | + 400, "Bad Request", "Unknown format: foo", |
---|
538 | self.PUT, self.public_url + \ |
---|
539 | hunk ./src/allmydata/test/test_web.py 3607 |
---|
540 | - "/foo/foo.txt?mutable=true&mutable-type=foo", |
---|
541 | + "/foo/foo.txt?format=foo", |
---|
542 | new_contents) |
---|
543 | |
---|
544 | def test_PUT_NEWFILEURL_uri_replace(self): |
---|
545 | hunk ./src/allmydata/test/test_web.py 3720 |
---|
546 | return d |
---|
547 | |
---|
548 | def test_PUT_mkdir_mdmf(self): |
---|
549 | - d = self.PUT("/uri?t=mkdir&mutable-type=mdmf", "") |
---|
550 | + d = self.PUT("/uri?t=mkdir&format=mdmf", "") |
---|
551 | def _got(res): |
---|
552 | u = uri.from_string(res) |
---|
553 | # Check that this is an MDMF writecap |
---|
554 | hunk ./src/allmydata/test/test_web.py 3729 |
---|
555 | return d |
---|
556 | |
---|
557 | def test_PUT_mkdir_sdmf(self): |
---|
558 | - d = self.PUT("/uri?t=mkdir&mutable-type=sdmf", "") |
---|
559 | + d = self.PUT("/uri?t=mkdir&format=sdmf", "") |
---|
560 | def _got(res): |
---|
561 | u = uri.from_string(res) |
---|
562 | self.failUnlessIsInstance(u, uri.DirectoryURI) |
---|
563 | hunk ./src/allmydata/test/test_web.py 3736 |
---|
564 | d.addCallback(_got) |
---|
565 | return d |
---|
566 | |
---|
567 | - def test_PUT_mkdir_bad_mutable_type(self): |
---|
568 | - return self.shouldHTTPError("bad mutable type", |
---|
569 | - 400, "Bad Request", "Unknown type: foo", |
---|
570 | - self.PUT, "/uri?t=mkdir&mutable-type=foo", |
---|
571 | + def test_PUT_mkdir_bad_format(self): |
---|
572 | + return self.shouldHTTPError("PUT_mkdir_bad_format", |
---|
573 | + 400, "Bad Request", "Unknown format: foo", |
---|
574 | + self.PUT, "/uri?t=mkdir&format=foo", |
---|
575 | "") |
---|
576 | |
---|
577 | def test_POST_check(self): |
---|
578 | } |
---|
579 | [test_web.py: minor cleanups, mainly to make the first argument to shouldFail tests consistent |
---|
580 | david-sarah@jacaranda.org**20111002040332 |
---|
581 | Ignore-this: 234ba793f78f112717e02755e1fa81b5 |
---|
582 | ] { |
---|
583 | hunk ./src/allmydata/test/test_web.py 1781 |
---|
584 | |
---|
585 | def test_POST_NEWDIRURL_emptyname(self): |
---|
586 | # an empty pathname component (i.e. a double-slash) is disallowed |
---|
587 | - d = self.shouldFail2(error.Error, "test_POST_NEWDIRURL_emptyname", |
---|
588 | + d = self.shouldFail2(error.Error, "POST_NEWDIRURL_emptyname", |
---|
589 | "400 Bad Request", |
---|
590 | "The webapi does not allow empty pathname components, i.e. a double slash", |
---|
591 | self.POST, self.public_url + "//?t=mkdir") |
---|
592 | hunk ./src/allmydata/test/test_web.py 2902 |
---|
593 | |
---|
594 | def test_POST_mkdir_immutable_bad(self): |
---|
595 | (newkids, caps) = self._create_initial_children() |
---|
596 | - d = self.shouldFail2(error.Error, "test_POST_mkdir_immutable_bad", |
---|
597 | + d = self.shouldFail2(error.Error, "POST_mkdir_immutable_bad", |
---|
598 | "400 Bad Request", |
---|
599 | "needed to be immutable but was not", |
---|
600 | self.POST2, |
---|
601 | hunk ./src/allmydata/test/test_web.py 3089 |
---|
602 | # the regular /uri?t=mkdir operation is specified to ignore its body. |
---|
603 | # Only t=mkdir-with-children pays attention to it. |
---|
604 | (newkids, caps) = self._create_initial_children() |
---|
605 | - d = self.shouldHTTPError("POST t=mkdir unexpected children", |
---|
606 | + d = self.shouldHTTPError("POST_mkdir_no_parentdir_unexpected_children", |
---|
607 | 400, "Bad Request", |
---|
608 | "t=mkdir does not accept children=, " |
---|
609 | "try t=mkdir-with-children instead", |
---|
610 | hunk ./src/allmydata/test/test_web.py 3098 |
---|
611 | return d |
---|
612 | |
---|
613 | def test_POST_noparent_bad(self): |
---|
614 | - d = self.shouldHTTPError("POST /uri?t=bogus", 400, "Bad Request", |
---|
615 | + d = self.shouldHTTPError("POST_noparent_bad", |
---|
616 | + 400, "Bad Request", |
---|
617 | "/uri accepts only PUT, PUT?t=mkdir, " |
---|
618 | "POST?t=upload, and POST?t=mkdir", |
---|
619 | self.POST, "/uri?t=bogus") |
---|
620 | hunk ./src/allmydata/test/test_web.py 3211 |
---|
621 | return d |
---|
622 | |
---|
623 | def test_POST_bad_t(self): |
---|
624 | - d = self.shouldFail2(error.Error, "POST_bad_t", "400 Bad Request", |
---|
625 | + d = self.shouldFail2(error.Error, "POST_bad_t", |
---|
626 | + "400 Bad Request", |
---|
627 | "POST to a directory with bad t=BOGUS", |
---|
628 | self.POST, self.public_url + "/foo", t="BOGUS") |
---|
629 | return d |
---|
630 | hunk ./src/allmydata/test/test_web.py 3555 |
---|
631 | |
---|
632 | def test_PUT_DIRURL_bad_t(self): |
---|
633 | d = self.shouldFail2(error.Error, "test_PUT_DIRURL_bad_t", |
---|
634 | - "400 Bad Request", "PUT to a directory", |
---|
635 | - self.PUT, self.public_url + "/foo?t=BOGUS", "") |
---|
636 | + "400 Bad Request", "PUT to a directory", |
---|
637 | + self.PUT, self.public_url + "/foo?t=BOGUS", "") |
---|
638 | d.addCallback(lambda res: |
---|
639 | self.failUnlessRWChildURIIs(self.public_root, |
---|
640 | u"foo", |
---|
641 | hunk ./src/allmydata/test/test_web.py 3624 |
---|
642 | def test_PUT_NEWFILEURL_uri_no_replace(self): |
---|
643 | contents, n, new_uri = self.makefile(8) |
---|
644 | d = self.PUT(self.public_url + "/foo/bar.txt?t=uri&replace=false", new_uri) |
---|
645 | - d.addBoth(self.shouldFail, error.Error, "PUT_NEWFILEURL_uri_no_replace", |
---|
646 | + d.addBoth(self.shouldFail, error.Error, |
---|
647 | + "PUT_NEWFILEURL_uri_no_replace", |
---|
648 | "409 Conflict", |
---|
649 | "There was already a child by that name, and you asked me " |
---|
650 | "to not replace it") |
---|
651 | hunk ./src/allmydata/test/test_web.py 3802 |
---|
652 | d.addCallback(_then) |
---|
653 | # Negative offsets should cause an error. |
---|
654 | d.addCallback(lambda ignored: |
---|
655 | - self.shouldHTTPError("test mutable invalid offset negative", |
---|
656 | + self.shouldHTTPError("PUT_update_at_invalid_offset", |
---|
657 | 400, "Bad Request", |
---|
658 | "Invalid offset", |
---|
659 | self.PUT, |
---|
660 | hunk ./src/allmydata/test/test_web.py 3817 |
---|
661 | self.filecap = filecap |
---|
662 | d.addCallback(_then) |
---|
663 | d.addCallback(lambda ignored: |
---|
664 | - self.shouldHTTPError("test immutable update", |
---|
665 | + self.shouldHTTPError("PUT_update_at_offset_immutable", |
---|
666 | 400, "Bad Request", |
---|
667 | "immutable", |
---|
668 | self.PUT, |
---|
669 | hunk ./src/allmydata/test/test_web.py 3828 |
---|
670 | |
---|
671 | def test_bad_method(self): |
---|
672 | url = self.webish_url + self.public_url + "/foo/bar.txt" |
---|
673 | - d = self.shouldHTTPError("test_bad_method", |
---|
674 | + d = self.shouldHTTPError("bad_method", |
---|
675 | 501, "Not Implemented", |
---|
676 | "I don't know how to treat a BOGUS request.", |
---|
677 | client.getPage, url, method="BOGUS") |
---|
678 | hunk ./src/allmydata/test/test_web.py 3836 |
---|
679 | |
---|
680 | def test_short_url(self): |
---|
681 | url = self.webish_url + "/uri" |
---|
682 | - d = self.shouldHTTPError("test_short_url", 501, "Not Implemented", |
---|
683 | + d = self.shouldHTTPError("short_url", 501, "Not Implemented", |
---|
684 | "I don't know how to treat a DELETE request.", |
---|
685 | client.getPage, url, method="DELETE") |
---|
686 | return d |
---|
687 | hunk ./src/allmydata/test/test_web.py 3843 |
---|
688 | |
---|
689 | def test_ophandle_bad(self): |
---|
690 | url = self.webish_url + "/operations/bogus?t=status" |
---|
691 | - d = self.shouldHTTPError("test_ophandle_bad", 404, "404 Not Found", |
---|
692 | + d = self.shouldHTTPError("ophandle_bad", 404, "404 Not Found", |
---|
693 | "unknown/expired handle 'bogus'", |
---|
694 | client.getPage, url) |
---|
695 | return d |
---|
696 | hunk ./src/allmydata/test/test_web.py 3867 |
---|
697 | return d |
---|
698 | d.addCallback(_check1) |
---|
699 | d.addCallback(lambda ignored: |
---|
700 | - self.shouldHTTPError("test_ophandle_cancel", |
---|
701 | + self.shouldHTTPError("ophandle_cancel", |
---|
702 | 404, "404 Not Found", |
---|
703 | "unknown/expired handle '128'", |
---|
704 | self.GET, |
---|
705 | hunk ./src/allmydata/test/test_web.py 3887 |
---|
706 | d.addCallback(lambda ign: |
---|
707 | self.clock.advance(2.0)) |
---|
708 | d.addCallback(lambda ignored: |
---|
709 | - self.shouldHTTPError("test_ophandle_retainfor", |
---|
710 | + self.shouldHTTPError("ophandle_retainfor", |
---|
711 | 404, "404 Not Found", |
---|
712 | "unknown/expired handle '129'", |
---|
713 | self.GET, |
---|
714 | hunk ./src/allmydata/test/test_web.py 3902 |
---|
715 | self.GET("/operations/130?t=status&output=JSON&release-after-complete=true")) |
---|
716 | # the release-after-complete=true will cause the handle to be expired |
---|
717 | d.addCallback(lambda ignored: |
---|
718 | - self.shouldHTTPError("test_ophandle_release_after_complete", |
---|
719 | + self.shouldHTTPError("ophandle_release_after_complete", |
---|
720 | 404, "404 Not Found", |
---|
721 | "unknown/expired handle '130'", |
---|
722 | self.GET, |
---|
723 | hunk ./src/allmydata/test/test_web.py 3944 |
---|
724 | d.addCallback(lambda ign: |
---|
725 | self.clock.advance(96*60*60)) |
---|
726 | d.addCallback(lambda ign: |
---|
727 | - self.shouldHTTPError("test_uncollected_ophandle_expired_after_100_hours", |
---|
728 | + self.shouldHTTPError("uncollected_ophandle_expired_after_100_hours", |
---|
729 | 404, "404 Not Found", |
---|
730 | "unknown/expired handle '132'", |
---|
731 | self.GET, |
---|
732 | hunk ./src/allmydata/test/test_web.py 3978 |
---|
733 | d.addCallback(lambda ign: |
---|
734 | self.clock.advance(24*60*60)) |
---|
735 | d.addCallback(lambda ign: |
---|
736 | - self.shouldHTTPError("test_collected_ophandle_expired_after_1000_minutes", |
---|
737 | + self.shouldHTTPError("collected_ophandle_expired_after_1_day", |
---|
738 | 404, "404 Not Found", |
---|
739 | "unknown/expired handle '134'", |
---|
740 | self.GET, |
---|
741 | } |
---|
742 | |
---|
743 | Context: |
---|
744 | |
---|
745 | [docs/configuration.rst: add section about the types of node, and clarify when setting web.port enables web-API service. fixes #1444 |
---|
746 | zooko@zooko.com**20110926203801 |
---|
747 | Ignore-this: ab94d470c68e720101a7ff3c207a719e |
---|
748 | ] |
---|
749 | [TAG allmydata-tahoe-1.9.0a2 |
---|
750 | warner@lothar.com**20110925234811 |
---|
751 | Ignore-this: e9649c58f9c9017a7d55008938dba64f |
---|
752 | ] |
---|
753 | [NEWS: tidy up a little bit, reprioritize some items, hide some non-user-visible items |
---|
754 | warner@lothar.com**20110925233529 |
---|
755 | Ignore-this: 61f334cc3fa2539742c3e5d2801aee81 |
---|
756 | ] |
---|
757 | [test/test_runner.py: BinTahoe.test_path has rare nondeterministic failures; this patch probably fixes a problem where the actual cause of failure is masked by a string conversion error. |
---|
758 | david-sarah@jacaranda.org**20110927225336 |
---|
759 | Ignore-this: 6f1ad68004194cc9cea55ace3745e4af |
---|
760 | ] |
---|
761 | [mutable/publish.py: fix an unused import. refs #1542 |
---|
762 | david-sarah@jacaranda.org**20110925052206 |
---|
763 | Ignore-this: 2d69ac9e605e789c0aedfecb8877b7d7 |
---|
764 | ] |
---|
765 | [docs: fix some broken .rst links. refs #1542 |
---|
766 | david-sarah@jacaranda.org**20110925051001 |
---|
767 | Ignore-this: 5714ee650abfcaab0914537e1f206972 |
---|
768 | ] |
---|
769 | [NEWS: fix .rst formatting. |
---|
770 | david-sarah@jacaranda.org**20110925050119 |
---|
771 | Ignore-this: aa1d20acd23bdb8f8f6d0fa048ea0277 |
---|
772 | ] |
---|
773 | [NEWS: updates for 1.9alpha2. |
---|
774 | david-sarah@jacaranda.org**20110925045343 |
---|
775 | Ignore-this: d2c44e4e05d2ed662b7adfd2e43928bc |
---|
776 | ] |
---|
777 | [mutable/layout.py: make unpack_sdmf_checkstring and unpack_mdmf_checkstring more similar, and change an assert to give a more useful message if it fails. refs #1540 |
---|
778 | david-sarah@jacaranda.org**20110925023651 |
---|
779 | Ignore-this: 977aaa8cb16e06a6dcc3e27cb6e23956 |
---|
780 | ] |
---|
781 | [mutable/publish: handle unknown mutable share formats when handling errors |
---|
782 | kevan@isnotajoke.com**20110925004305 |
---|
783 | Ignore-this: 4d5fa44ef7d777c432eb10c9584ad51f |
---|
784 | ] |
---|
785 | [mutable/layout: break unpack_checkstring into unpack_mdmf_checkstring and unpack_sdmf_checkstring, add distinguisher function for checkstrings |
---|
786 | kevan@isnotajoke.com**20110925004134 |
---|
787 | Ignore-this: 57f49ed5a72e418a69c7286a225cc8fb |
---|
788 | ] |
---|
789 | [test/test_mutable: reenable mdmf publish surprise test |
---|
790 | kevan@isnotajoke.com**20110924235415 |
---|
791 | Ignore-this: f752e47a703684491305cc83d16248fb |
---|
792 | ] |
---|
793 | [mutable/publish: use unpack_mdmf_checkstring and unpack_sdmf_checkstring instead of unpack_checkstring. fixes #1540 |
---|
794 | kevan@isnotajoke.com**20110924235137 |
---|
795 | Ignore-this: 52ca3d9627b8b0ba758367b2bd6c7085 |
---|
796 | ] |
---|
797 | [control.py: unbreak speed-test: overwrite() wants a MutableData, not str |
---|
798 | Brian Warner <warner@lothar.com>**20110923073748 |
---|
799 | Ignore-this: 7dad7aff3d66165868a64ae22d225fa3 |
---|
800 | |
---|
801 | Really, all the upload/modify APIs should take a string or a filehandle, and |
---|
802 | internally wrap it as needed. Callers should not need to be aware of |
---|
803 | Uploadable() or MutableData() classes. |
---|
804 | ] |
---|
805 | [misc/coding_tools/check_interfaces.py: report all violations rather than only one for a given class, by including a forked version of verifyClass. refs #1474 |
---|
806 | david-sarah@jacaranda.org**20110916223450 |
---|
807 | Ignore-this: 927efeecf4d12588316826a4b3479aa9 |
---|
808 | ] |
---|
809 | [misc/coding_tools/check_interfaces.py: use os.walk instead of FilePath, since this script shouldn't really depend on Twisted. refs #1474 |
---|
810 | david-sarah@jacaranda.org**20110916212633 |
---|
811 | Ignore-this: 46eeb4236b34375227dac71ef53f5428 |
---|
812 | ] |
---|
813 | [misc/coding_tools/check-interfaces.py: reduce false-positives by adding Dummy* to the set of excluded classnames, and bench-* to the set of excluded basenames. refs #1474 |
---|
814 | david-sarah@jacaranda.org**20110916212624 |
---|
815 | Ignore-this: 4e78f6e6fe6c0e9be9df826a0e206804 |
---|
816 | ] |
---|
817 | [Add a script 'misc/coding_tools/check-interfaces.py' that checks whether zope interfaces are enforced. Also add 'check-interfaces', 'version-and-path', and 'code-checks' targets to the Makefile. fixes #1474 |
---|
818 | david-sarah@jacaranda.org**20110915161532 |
---|
819 | Ignore-this: 32d9bdc5bc4a86d21e927724560ad4b4 |
---|
820 | ] |
---|
821 | [mutable/publish.py: copy the self.writers dict before iterating over it, since we remove elements from it during the iteration. refs #393 |
---|
822 | david-sarah@jacaranda.org**20110924211208 |
---|
823 | Ignore-this: 76d4066b55d50ace2a34b87443b39094 |
---|
824 | ] |
---|
825 | [mutable/publish.py: simplify by refactoring self.outstanding to self.num_outstanding. refs #393 |
---|
826 | david-sarah@jacaranda.org**20110924205004 |
---|
827 | Ignore-this: 902768cfc529ae13ae0b7f67768a3643 |
---|
828 | ] |
---|
829 | [test_mutable.py: update SkipTest message for test_publish_surprise_mdmf to reference the right ticket number. refs #1540. |
---|
830 | david-sarah@jacaranda.org**20110923211622 |
---|
831 | Ignore-this: 44f16a6817a6b75930bbba18b0a516be |
---|
832 | ] |
---|
833 | [test_mutable.py: skip test_publish_surprise_mdmf, which is causing an error. refs #1534, #393 |
---|
834 | david-sarah@jacaranda.org**20110920183319 |
---|
835 | Ignore-this: 6fb020e09e8de437cbcc2c9f57835b31 |
---|
836 | ] |
---|
837 | [test/test_mutable: write publish surprise test for MDMF, rename existing test_publish_surprise to clarify that it is for SDMF |
---|
838 | kevan@isnotajoke.com**20110918003657 |
---|
839 | Ignore-this: 722c507e8f5b537ff920e0555951059a |
---|
840 | ] |
---|
841 | [test/test_mutable: refactor publish surprise test into common test fixture, rewrite test_publish_surprise to use test fixture |
---|
842 | kevan@isnotajoke.com**20110918003533 |
---|
843 | Ignore-this: 6f135888d400a99a09b5f9a4be443b6e |
---|
844 | ] |
---|
845 | [mutable/publish: add errback immediately after write, don't consume errors from other parts of the publisher |
---|
846 | kevan@isnotajoke.com**20110917234708 |
---|
847 | Ignore-this: 12bf6b0918a5dc5ffc30ece669fad51d |
---|
848 | ] |
---|
849 | [.darcs-boringfile: minor cleanups. |
---|
850 | david-sarah@jacaranda.org**20110920154918 |
---|
851 | Ignore-this: cab78e30d293da7e2832207dbee2ffeb |
---|
852 | ] |
---|
853 | [uri.py: fix two interface violations in verifier URI classes. refs #1474 |
---|
854 | david-sarah@jacaranda.org**20110920030156 |
---|
855 | Ignore-this: 454ddd1419556cb1d7576d914cb19598 |
---|
856 | ] |
---|
857 | [Make platform-detection code tolerate linux-3.0, patch by zooko. |
---|
858 | Brian Warner <warner@lothar.com>**20110915202620 |
---|
859 | Ignore-this: af63cf9177ae531984dea7a1cad03762 |
---|
860 | |
---|
861 | Otherwise address-autodetection can't find ifconfig. refs #1536 |
---|
862 | ] |
---|
863 | [test_web.py: fix a bug in _count_leases that was causing us to check only the lease count of one share file, not of all share files as intended. |
---|
864 | david-sarah@jacaranda.org**20110915185126 |
---|
865 | Ignore-this: d96632bc48d770b9b577cda1bbd8ff94 |
---|
866 | ] |
---|
867 | [docs: insert a newline at the beginning of known_issues.rst to see if this makes it render more nicely in trac |
---|
868 | zooko@zooko.com**20110914064728 |
---|
869 | Ignore-this: aca15190fa22083c5d4114d3965f5d65 |
---|
870 | ] |
---|
871 | [docs: remove the coding: utf-8 declaration at the to of known_issues.rst, since the trac rendering doesn't hide it |
---|
872 | zooko@zooko.com**20110914055713 |
---|
873 | Ignore-this: 941ed32f83ead377171aa7a6bd198fcf |
---|
874 | ] |
---|
875 | [docs: more cleanup of known_issues.rst -- now it passes "rst2html --verbose" without comment |
---|
876 | zooko@zooko.com**20110914055419 |
---|
877 | Ignore-this: 5505b3d76934bd97d0312cc59ed53879 |
---|
878 | ] |
---|
879 | [docs: more formatting improvements to known_issues.rst |
---|
880 | zooko@zooko.com**20110914051639 |
---|
881 | Ignore-this: 9ae9230ec9a38a312cbacaf370826691 |
---|
882 | ] |
---|
883 | [docs: reformatting of known_issues.rst |
---|
884 | zooko@zooko.com**20110914050240 |
---|
885 | Ignore-this: b8be0375079fb478be9d07500f9aaa87 |
---|
886 | ] |
---|
887 | [docs: fix formatting error in docs/known_issues.rst |
---|
888 | zooko@zooko.com**20110914045909 |
---|
889 | Ignore-this: f73fe74ad2b9e655aa0c6075acced15a |
---|
890 | ] |
---|
891 | [merge Tahoe-LAFS v1.8.3 release announcement with trunk |
---|
892 | zooko@zooko.com**20110913210544 |
---|
893 | Ignore-this: 163f2c3ddacca387d7308e4b9332516e |
---|
894 | ] |
---|
895 | [docs: release notes for Tahoe-LAFS v1.8.3 |
---|
896 | zooko@zooko.com**20110913165826 |
---|
897 | Ignore-this: 84223604985b14733a956d2fbaeb4e9f |
---|
898 | ] |
---|
899 | [tests: bump up the timeout in this test that fails on FreeStorm's CentOS in order to see if it is just very slow |
---|
900 | zooko@zooko.com**20110913024255 |
---|
901 | Ignore-this: 6a86d691e878cec583722faad06fb8e4 |
---|
902 | ] |
---|
903 | [interfaces: document that the 'fills-holes-with-zero-bytes' key should be used to detect whether a storage server has that behavior. refs #1528 |
---|
904 | david-sarah@jacaranda.org**20110913002843 |
---|
905 | Ignore-this: 1a00a6029d40f6792af48c5578c1fd69 |
---|
906 | ] |
---|
907 | [CREDITS: more CREDITS for Kevan and David-Sarah |
---|
908 | zooko@zooko.com**20110912223357 |
---|
909 | Ignore-this: 4ea8f0d6f2918171d2f5359c25ad1ada |
---|
910 | ] |
---|
911 | [merge NEWS about the mutable file bounds fixes with NEWS about work-in-progress |
---|
912 | zooko@zooko.com**20110913205521 |
---|
913 | Ignore-this: 4289a4225f848d6ae6860dd39bc92fa8 |
---|
914 | ] |
---|
915 | [doc: add NEWS item about fixes to potential palimpsest issues in mutable files |
---|
916 | zooko@zooko.com**20110912223329 |
---|
917 | Ignore-this: 9d63c95ddf95c7d5453c94a1ba4d406a |
---|
918 | ref. #1528 |
---|
919 | ] |
---|
920 | [merge the NEWS about the security fix (#1528) with the work-in-progress NEWS |
---|
921 | zooko@zooko.com**20110913205153 |
---|
922 | Ignore-this: 88e88a2ad140238c62010cf7c66953fc |
---|
923 | ] |
---|
924 | [doc: add NEWS entry about the issue which allows unauthorized deletion of shares |
---|
925 | zooko@zooko.com**20110912223246 |
---|
926 | Ignore-this: 77e06d09103d2ef6bb51ea3e5d6e80b0 |
---|
927 | ref. #1528 |
---|
928 | ] |
---|
929 | [doc: add entry in known_issues.rst about the issue which allows unauthorized deletion of shares |
---|
930 | zooko@zooko.com**20110912223135 |
---|
931 | Ignore-this: b26c6ea96b6c8740b93da1f602b5a4cd |
---|
932 | ref. #1528 |
---|
933 | ] |
---|
934 | [storage: more paranoid handling of bounds and palimpsests in mutable share files |
---|
935 | zooko@zooko.com**20110912222655 |
---|
936 | Ignore-this: a20782fa423779ee851ea086901e1507 |
---|
937 | * storage server ignores requests to extend shares by sending a new_length |
---|
938 | * storage server fills exposed holes (created by sending a write vector whose offset begins after the end of the current data) with 0 to avoid "palimpsest" exposure of previous contents |
---|
939 | * storage server zeroes out lease info at the old location when moving it to a new location |
---|
940 | ref. #1528 |
---|
941 | ] |
---|
942 | [storage: test that the storage server ignores requests to extend shares by sending a new_length, and that the storage server fills exposed holes with 0 to avoid "palimpsest" exposure of previous contents |
---|
943 | zooko@zooko.com**20110912222554 |
---|
944 | Ignore-this: 61ebd7b11250963efdf5b1734a35271 |
---|
945 | ref. #1528 |
---|
946 | ] |
---|
947 | [immutable: prevent clients from reading past the end of share data, which would allow them to learn the cancellation secret |
---|
948 | zooko@zooko.com**20110912222458 |
---|
949 | Ignore-this: da1ebd31433ea052087b75b2e3480c25 |
---|
950 | Declare explicitly that we prevent this problem in the server's version dict. |
---|
951 | fixes #1528 (there are two patches that are each a sufficient fix to #1528 and this is one of them) |
---|
952 | ] |
---|
953 | [storage: remove the storage server's "remote_cancel_lease" function |
---|
954 | zooko@zooko.com**20110912222331 |
---|
955 | Ignore-this: 1c32dee50e0981408576daffad648c50 |
---|
956 | We're removing this function because it is currently unused, because it is dangerous, and because the bug described in #1528 leaks the cancellation secret, which allows anyone who knows a file's storage index to abuse this function to delete shares of that file. |
---|
957 | fixes #1528 (there are two patches that are each a sufficient fix to #1528 and this is one of them) |
---|
958 | ] |
---|
959 | [storage: test that the storage server does *not* have a "remote_cancel_lease" function |
---|
960 | zooko@zooko.com**20110912222324 |
---|
961 | Ignore-this: 21c652009704652d35f34651f98dd403 |
---|
962 | We're removing this function because it is currently unused, because it is dangerous, and because the bug described in #1528 leaks the cancellation secret, which allows anyone who knows a file's storage index to abuse this function to delete shares of that file. |
---|
963 | ref. #1528 |
---|
964 | ] |
---|
965 | [immutable: test whether the server allows clients to read past the end of share data, which would allow them to learn the cancellation secret |
---|
966 | zooko@zooko.com**20110912221201 |
---|
967 | Ignore-this: 376e47b346c713d37096531491176349 |
---|
968 | Also test whether the server explicitly declares that it prevents this problem. |
---|
969 | ref #1528 |
---|
970 | ] |
---|
971 | [Retrieve._activate_enough_peers: rewrite Verify logic |
---|
972 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
973 | Ignore-this: 9367c11e1eacbf025f75ce034030d717 |
---|
974 | ] |
---|
975 | [Retrieve: implement/test stopProducing |
---|
976 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
977 | Ignore-this: 47b2c3df7dc69835e0a066ca12e3c178 |
---|
978 | ] |
---|
979 | [move DownloadStopped from download.common to interfaces |
---|
980 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
981 | Ignore-this: 8572acd3bb16e50341dbed8eb1d90a50 |
---|
982 | ] |
---|
983 | [retrieve.py: remove vestigal self._validated_readers |
---|
984 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
985 | Ignore-this: faab2ec14e314a53a2ffb714de626e2d |
---|
986 | ] |
---|
987 | [Retrieve: rewrite flow-control: use a top-level loop() to catch all errors |
---|
988 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
989 | Ignore-this: e162d2cd53b3d3144fc6bc757e2c7714 |
---|
990 | |
---|
991 | This ought to close the potential for dropped errors and hanging downloads. |
---|
992 | Verify needs to be examined, I may have broken it, although all tests pass. |
---|
993 | ] |
---|
994 | [Retrieve: merge _validate_active_prefixes into _add_active_peers |
---|
995 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
996 | Ignore-this: d3ead31e17e69394ae7058eeb5beaf4c |
---|
997 | ] |
---|
998 | [Retrieve: remove the initial prefix-is-still-good check |
---|
999 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
1000 | Ignore-this: da66ee51c894eaa4e862e2dffb458acc |
---|
1001 | |
---|
1002 | This check needs to be done with each fetch from the storage server, to |
---|
1003 | detect when someone has changed the share (i.e. our servermap goes stale). |
---|
1004 | Doing it just once at the beginning of retrieve isn't enough: a write might |
---|
1005 | occur after the first segment but before the second, etc. |
---|
1006 | |
---|
1007 | _try_to_validate_prefix() was not removed: it will be used by the future |
---|
1008 | check-with-each-fetch code. |
---|
1009 | |
---|
1010 | test_mutable.Roundtrip.test_corrupt_all_seqnum_late was disabled, since it |
---|
1011 | fails until this check is brought back. (the corruption it applies only |
---|
1012 | touches the prefix, not the block data, so the check-less retrieve actually |
---|
1013 | tolerates it). Don't forget to re-enable it once the check is brought back. |
---|
1014 | ] |
---|
1015 | [MDMFSlotReadProxy: remove the queue |
---|
1016 | Brian Warner <warner@lothar.com>**20110909181150 |
---|
1017 | Ignore-this: 96673cb8dda7a87a423de2f4897d66d2 |
---|
1018 | |
---|
1019 | This is a neat trick to reduce Foolscap overhead, but the need for an |
---|
1020 | explicit flush() complicates the Retrieve path and makes it prone to |
---|
1021 | lost-progress bugs. |
---|
1022 | |
---|
1023 | Also change test_mutable.FakeStorageServer to tolerate multiple reads of the |
---|
1024 | same share in a row, a limitation exposed by turning off the queue. |
---|
1025 | ] |
---|
1026 | [rearrange Retrieve: first step, shouldn't change order of execution |
---|
1027 | Brian Warner <warner@lothar.com>**20110909181149 |
---|
1028 | Ignore-this: e3006368bfd2802b82ea45c52409e8d6 |
---|
1029 | ] |
---|
1030 | [CLI: test_cli.py -- remove an unnecessary call in test_mkdir_mutable_type. refs #1527 |
---|
1031 | david-sarah@jacaranda.org**20110906183730 |
---|
1032 | Ignore-this: 122e2ffbee84861c32eda766a57759cf |
---|
1033 | ] |
---|
1034 | [CLI: improve test for 'tahoe mkdir --mutable-type='. refs #1527 |
---|
1035 | david-sarah@jacaranda.org**20110906183020 |
---|
1036 | Ignore-this: f1d4598e6c536f0a2b15050b3bc0ef9d |
---|
1037 | ] |
---|
1038 | [CLI: make the --mutable-type option value for 'tahoe put' and 'tahoe mkdir' case-insensitive, and change --help for these commands accordingly. fixes #1527 |
---|
1039 | david-sarah@jacaranda.org**20110905020922 |
---|
1040 | Ignore-this: 75a6df0a2df9c467d8c010579e9a024e |
---|
1041 | ] |
---|
1042 | [cli: make --mutable-type imply --mutable in 'tahoe put' |
---|
1043 | Kevan Carstensen <kevan@isnotajoke.com>**20110903190920 |
---|
1044 | Ignore-this: 23336d3c43b2a9554e40c2a11c675e93 |
---|
1045 | ] |
---|
1046 | [SFTP: add a comment about a subtle interaction between OverwriteableFileConsumer and GeneralSFTPFile, and test the case it is commenting on. |
---|
1047 | david-sarah@jacaranda.org**20110903222304 |
---|
1048 | Ignore-this: 980c61d4dd0119337f1463a69aeebaf0 |
---|
1049 | ] |
---|
1050 | [improve the storage/mutable.py asserts even more |
---|
1051 | warner@lothar.com**20110901160543 |
---|
1052 | Ignore-this: 5b2b13c49bc4034f96e6e3aaaa9a9946 |
---|
1053 | ] |
---|
1054 | [storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts |
---|
1055 | wilcoxjg@gmail.com**20110901084144 |
---|
1056 | Ignore-this: 28ace2b2678642e4d7269ddab8c67f30 |
---|
1057 | ] |
---|
1058 | [docs/write_coordination.rst: fix formatting and add more specific warning about access via sshfs. |
---|
1059 | david-sarah@jacaranda.org**20110831232148 |
---|
1060 | Ignore-this: cd9c851d3eb4e0a1e088f337c291586c |
---|
1061 | ] |
---|
1062 | [test_mutable.Version: consolidate some tests, reduce runtime from 19s to 15s |
---|
1063 | warner@lothar.com**20110831050451 |
---|
1064 | Ignore-this: 64815284d9e536f8f3798b5f44cf580c |
---|
1065 | ] |
---|
1066 | [mutable/retrieve: handle the case where self._read_length is 0. |
---|
1067 | Kevan Carstensen <kevan@isnotajoke.com>**20110830210141 |
---|
1068 | Ignore-this: fceafbe485851ca53f2774e5a4fd8d30 |
---|
1069 | |
---|
1070 | Note that the downloader will still fetch a segment for a zero-length |
---|
1071 | read, which is wasteful. Fixing that isn't specifically required to fix |
---|
1072 | #1512, but it should probably be fixed before 1.9. |
---|
1073 | ] |
---|
1074 | [NEWS: added summary of all changes since 1.8.2. Needs editing. |
---|
1075 | Brian Warner <warner@lothar.com>**20110830163205 |
---|
1076 | Ignore-this: 273899b37a899fc6919b74572454b8b2 |
---|
1077 | ] |
---|
1078 | [test_mutable.Update: only upload the files needed for each test. refs #1500 |
---|
1079 | Brian Warner <warner@lothar.com>**20110829072717 |
---|
1080 | Ignore-this: 4d2ab4c7523af9054af7ecca9c3d9dc7 |
---|
1081 | |
---|
1082 | This first step shaves 15% off the runtime: from 139s to 119s on my laptop. |
---|
1083 | It also fixes a couple of places where a Deferred was being dropped, which |
---|
1084 | would cause two tests to run in parallel and also confuse error reporting. |
---|
1085 | ] |
---|
1086 | [Let Uploader retain History instead of passing it into upload(). Fixes #1079. |
---|
1087 | Brian Warner <warner@lothar.com>**20110829063246 |
---|
1088 | Ignore-this: 3902c58ec12bd4b2d876806248e19f17 |
---|
1089 | |
---|
1090 | This consistently records all immutable uploads in the Recent Uploads And |
---|
1091 | Downloads page, regardless of code path. Previously, certain webapi upload |
---|
1092 | operations (like PUT /uri/$DIRCAP/newchildname) failed to pass the History |
---|
1093 | object and were left out. |
---|
1094 | ] |
---|
1095 | [Fix mutable publish/retrieve timing status displays. Fixes #1505. |
---|
1096 | Brian Warner <warner@lothar.com>**20110828232221 |
---|
1097 | Ignore-this: 4080ce065cf481b2180fd711c9772dd6 |
---|
1098 | |
---|
1099 | publish: |
---|
1100 | * encrypt and encode times are cumulative, not just current-segment |
---|
1101 | |
---|
1102 | retrieve: |
---|
1103 | * same for decrypt and decode times |
---|
1104 | * update "current status" to include segment number |
---|
1105 | * set status to Finished/Failed when download is complete |
---|
1106 | * set progress to 1.0 when complete |
---|
1107 | |
---|
1108 | More improvements to consider: |
---|
1109 | * progress is currently 0% or 100%: should calculate how many segments are |
---|
1110 | involved (remembering retrieve can be less than the whole file) and set it |
---|
1111 | to a fraction |
---|
1112 | * "fetch" time is fuzzy: what we want is to know how much of the delay is not |
---|
1113 | our own fault, but since we do decode/decrypt work while waiting for more |
---|
1114 | shares, it's not straightforward |
---|
1115 | ] |
---|
1116 | [Teach 'tahoe debug catalog-shares about MDMF. Closes #1507. |
---|
1117 | Brian Warner <warner@lothar.com>**20110828080931 |
---|
1118 | Ignore-this: 56ef2951db1a648353d7daac6a04c7d1 |
---|
1119 | ] |
---|
1120 | [debug.py: remove some dead comments |
---|
1121 | Brian Warner <warner@lothar.com>**20110828074556 |
---|
1122 | Ignore-this: 40e74040dd4d14fd2f4e4baaae506b31 |
---|
1123 | ] |
---|
1124 | [hush pyflakes |
---|
1125 | Brian Warner <warner@lothar.com>**20110828074254 |
---|
1126 | Ignore-this: bef9d537a969fa82fe4decc4ba2acb09 |
---|
1127 | ] |
---|
1128 | [MutableFileNode.set_downloader_hints: never depend upon order of dict.values() |
---|
1129 | Brian Warner <warner@lothar.com>**20110828074103 |
---|
1130 | Ignore-this: caaf1aa518dbdde4d797b7f335230faa |
---|
1131 | |
---|
1132 | The old code was calculating the "extension parameters" (a list) from the |
---|
1133 | downloader hints (a dictionary) with hints.values(), which is not stable, and |
---|
1134 | would result in corrupted filecaps (with the 'k' and 'segsize' hints |
---|
1135 | occasionally swapped). The new code always uses [k,segsize]. |
---|
1136 | ] |
---|
1137 | [layout.py: fix MDMF share layout documentation |
---|
1138 | Brian Warner <warner@lothar.com>**20110828073921 |
---|
1139 | Ignore-this: 3f13366fed75b5e31b51ae895450a225 |
---|
1140 | ] |
---|
1141 | [teach 'tahoe debug dump-share' about MDMF and offsets. refs #1507 |
---|
1142 | Brian Warner <warner@lothar.com>**20110828073834 |
---|
1143 | Ignore-this: 3a9d2ef9c47a72bf1506ba41199a1dea |
---|
1144 | ] |
---|
1145 | [test_mutable.Version.test_debug: use splitlines() to fix buildslaves |
---|
1146 | Brian Warner <warner@lothar.com>**20110828064728 |
---|
1147 | Ignore-this: c7f6245426fc80b9d1ae901d5218246a |
---|
1148 | |
---|
1149 | Any slave running in a directory with spaces in the name was miscounting |
---|
1150 | shares, causing the test to fail. |
---|
1151 | ] |
---|
1152 | [test_mutable.Version: exercise 'tahoe debug find-shares' on MDMF. refs #1507 |
---|
1153 | Brian Warner <warner@lothar.com>**20110828005542 |
---|
1154 | Ignore-this: cb20bea1c28bfa50a72317d70e109672 |
---|
1155 | |
---|
1156 | Also changes NoNetworkGrid to put shares in storage/shares/ . |
---|
1157 | ] |
---|
1158 | [test_mutable.py: oops, missed a .todo |
---|
1159 | Brian Warner <warner@lothar.com>**20110828002118 |
---|
1160 | Ignore-this: fda09ae86481352b7a627c278d2a3940 |
---|
1161 | ] |
---|
1162 | [test_mutable: merge davidsarah's patch with my Version refactorings |
---|
1163 | warner@lothar.com**20110827235707 |
---|
1164 | Ignore-this: b5aaf481c90d99e33827273b5d118fd0 |
---|
1165 | ] |
---|
1166 | [Make the immutable/read-only constraint checking for MDMF URIs identical to that for SSK URIs. refs #393 |
---|
1167 | david-sarah@jacaranda.org**20110823012720 |
---|
1168 | Ignore-this: e1f59d7ff2007c81dbef2aeb14abd721 |
---|
1169 | ] |
---|
1170 | [Additional tests for MDMF URIs and for zero-length files. refs #393 |
---|
1171 | david-sarah@jacaranda.org**20110823011532 |
---|
1172 | Ignore-this: a7cc0c09d1d2d72413f9cd227c47a9d5 |
---|
1173 | ] |
---|
1174 | [Additional tests for zero-length partial reads and updates to mutable versions. refs #393 |
---|
1175 | david-sarah@jacaranda.org**20110822014111 |
---|
1176 | Ignore-this: 5fc6f4d06e11910124e4a277ec8a43ea |
---|
1177 | ] |
---|
1178 | [test_mutable.Version: factor out some expensive uploads, save 25% runtime |
---|
1179 | Brian Warner <warner@lothar.com>**20110827232737 |
---|
1180 | Ignore-this: ea37383eb85ea0894b254fe4dfb45544 |
---|
1181 | ] |
---|
1182 | [SDMF: update filenode with correct k/N after Retrieve. Fixes #1510. |
---|
1183 | Brian Warner <warner@lothar.com>**20110827225031 |
---|
1184 | Ignore-this: b50ae6e1045818c400079f118b4ef48 |
---|
1185 | |
---|
1186 | Without this, we get a regression when modifying a mutable file that was |
---|
1187 | created with more shares (larger N) than our current tahoe.cfg . The |
---|
1188 | modification attempt creates new versions of the (0,1,..,newN-1) shares, but |
---|
1189 | leaves the old versions of the (newN,..,oldN-1) shares alone (and throws a |
---|
1190 | assertion error in SDMFSlotWriteProxy.finish_publishing in the process). |
---|
1191 | |
---|
1192 | The mixed versions that result (some shares with e.g. N=10, some with N=20, |
---|
1193 | such that both versions are recoverable) cause problems for the Publish code, |
---|
1194 | even before MDMF landed. Might be related to refs #1390 and refs #1042. |
---|
1195 | ] |
---|
1196 | [layout.py: annotate assertion to figure out 'tahoe backup' failure |
---|
1197 | Brian Warner <warner@lothar.com>**20110827195253 |
---|
1198 | Ignore-this: 9b92b954e3ed0d0f80154fff1ff674e5 |
---|
1199 | ] |
---|
1200 | [Add 'tahoe debug dump-cap' support for MDMF, DIR2-CHK, DIR2-MDMF. refs #1507. |
---|
1201 | Brian Warner <warner@lothar.com>**20110827195048 |
---|
1202 | Ignore-this: 61c6af5e33fc88e0251e697a50addb2c |
---|
1203 | |
---|
1204 | This also adds tests for all those cases, and fixes an omission in uri.py |
---|
1205 | that broke parsing of DIR2-MDMF-Verifier and DIR2-CHK-Verifier. |
---|
1206 | ] |
---|
1207 | [MDMF: more writable/writeable consistentifications |
---|
1208 | warner@lothar.com**20110827190602 |
---|
1209 | Ignore-this: 22492a9e20c1819ddb12091062888b55 |
---|
1210 | ] |
---|
1211 | [MDMF: s/Writable/Writeable/g, for consistency with existing SDMF code |
---|
1212 | warner@lothar.com**20110827183357 |
---|
1213 | Ignore-this: 9dd312acedbdb2fc2f7bef0d0fb17c0b |
---|
1214 | ] |
---|
1215 | [setup.cfg: remove no-longer-supported test_mac_diskimage alias. refs #1479 |
---|
1216 | david-sarah@jacaranda.org**20110826230345 |
---|
1217 | Ignore-this: 40e908b8937322a290fb8012bfcad02a |
---|
1218 | ] |
---|
1219 | [test_mutable.Update: increase timeout from 120s to 400s, slaves are failing |
---|
1220 | Brian Warner <warner@lothar.com>**20110825230140 |
---|
1221 | Ignore-this: 101b1924a30cdbda9b2e419e95ca15ec |
---|
1222 | ] |
---|
1223 | [tests: fix check_memory test |
---|
1224 | zooko@zooko.com**20110825201116 |
---|
1225 | Ignore-this: 4d66299fa8cb61d2ca04b3f45344d835 |
---|
1226 | fixes #1503 |
---|
1227 | ] |
---|
1228 | [TAG allmydata-tahoe-1.9.0a1 |
---|
1229 | warner@lothar.com**20110825161122 |
---|
1230 | Ignore-this: 3cbf49f00dbda58189f893c427f65605 |
---|
1231 | ] |
---|
1232 | Patch bundle hash: |
---|
1233 | 4d762dce8774d561fb8f0a869f0786c1387a9b6f |
---|