Commit Graph

14736 Commits

Author SHA1 Message Date
meejah 9732955eba spelling 2020-04-18 01:52:17 -06:00
meejah 25096715fb flake8 2020-04-18 01:52:17 -06:00
meejah 74ce166463 use twisted-web APIs, not nevow 2020-04-18 01:52:17 -06:00
meejah 044d1cfbea correct error 2020-04-18 01:52:17 -06:00
meejah 6415873f0b undo change 2020-04-18 01:52:17 -06:00
meejah d0c47fe1d1 irrelevant comment 2020-04-18 01:52:17 -06:00
meejah 97a3f61c28 irrelevant comment 2020-04-18 01:52:17 -06:00
meejah bc04c9b3db detech empty pathname components, hopefully the same way as Nevow 2020-04-18 01:52:17 -06:00
meejah 83a70bb6f3 some fixes 2020-04-18 01:52:17 -06:00
meejah d26ce3beb0 some things that fail, but not in quite the right way .. for reasons 2020-04-18 01:52:17 -06:00
meejah 8268f764aa quote output, render GET 2020-04-18 01:52:17 -06:00
meejah e894795898 redirects don't have to be absolute 2020-04-18 01:52:17 -06:00
meejah 45bfe743d4 improve comment wording 2020-04-18 01:52:17 -06:00
meejah c4f49bb377 children must be None on error 2020-04-18 01:52:17 -06:00
meejah 543a948d32 shadowed test name; reveal both tests 2020-04-18 01:52:17 -06:00
meejah 98005bab1f addSlash isn't a thing in twisted.web 2020-04-18 01:52:17 -06:00
meejah a29f1bec9d doubly-quoted 2020-04-18 01:52:17 -06:00
meejah 800b69047c the error-message changed 2020-04-18 01:52:17 -06:00
meejah effaa6500c filename goes in the dict 2020-04-18 01:52:17 -06:00
meejah 19baba226a Resource needs to be new-style 2020-04-18 01:52:17 -06:00
meejah dc4669b5e7 fix name decoding 2020-04-18 01:52:17 -06:00
meejah 66f392f7d0 remove debug 2020-04-18 01:52:17 -06:00
meejah 410f0133ab correctly register top-level directory node page 2020-04-18 01:52:17 -06:00
meejah 921926239a Revert "fix getchild for directory"
This reverts commit 8f00f4d4ab2e7edd0ad60a6144e858ece4a4be1f.
2020-04-18 01:52:17 -06:00
meejah 247fc54f8c explicit pack/unpack test 2020-04-18 01:52:17 -06:00
meejah b4d9bfea15 fix deep-stats results 2020-04-18 01:52:17 -06:00
meejah 7a36bdc523 delete 'move to different dir' because it also doesn't work on trunk 2020-04-18 01:52:17 -06:00
meejah e2304326fd fix rename-form 2020-04-18 01:52:17 -06:00
meejah d12078abe2 fix form 2020-04-18 01:52:17 -06:00
meejah 8b7e1c30ab remove debug 2020-04-18 01:52:17 -06:00
meejah d381d3e92b better style 2020-04-18 01:52:17 -06:00
meejah f4c8eb5e2f not required 2020-04-18 01:52:17 -06:00
meejah 71c97369f0 fix getchild for directory 2020-04-18 01:52:17 -06:00
meejah 8f32936c7a /file works 2020-04-18 01:52:17 -06:00
meejah c2ff7e260b more ctx -> req 2020-04-18 01:52:17 -06:00
meejah 79c3f919ba cleanup 2020-04-18 01:52:17 -06:00
meejah b51f144f87 another thing works 2020-04-18 01:52:17 -06:00
meejah 66c0c71a0d a thing works 2020-04-18 01:52:17 -06:00
meejah ace73a9215 whitespace 2020-04-18 01:52:17 -06:00
meejah 9e0e25cbed WIP FIXME porting directory, need child_ refactor thing 2020-04-18 01:52:17 -06:00
meejah fd4d2709a5 search-replace "n:" -> "t:" 2020-04-18 01:52:17 -06:00
Sajith Sasidharan 73938ad446 Drop upper bound on Twisted version
CI broke build because CI was broke; the new Twisted release wasn't
the problem.
2020-04-17 15:44:39 -04:00
Sajith Sasidharan 15131a9f71 Handle just POST requests in IncidentReporter 2020-04-17 15:44:39 -04:00
Sajith Sasidharan 497a832ad9 Use Twisted < 20.0.0
Twisted 20.3.0 has dropped Python 2.7 support, so we need to stick to
the prior release as long as we use Python 2.7.
2020-04-17 15:44:39 -04:00
Sajith Sasidharan a14cee5cce Remove nevow from allmydata.web.root.IncidentReporter
This change calls for an explanation:

- `RenderMixin` doesn't seem to be adding anything here, so it is
   gone.

- The web browser was unhappy without a charset in the response
  (Firefox 74 was anyway), so `content-type` header also gets a
  `charset=UTF-8`.

- Returning a Unicode string made nevow appserver unhappy, so it is
  just a `str`.  The precise error message was:

  exceptions.TypeError: ('Could not adapt', u'An incident report has been saved to logs/incidents/ in the node directory.', <InterfaceClass nevow.inevow.IResource>)

Fixes: ticket:3294
2020-04-17 15:44:39 -04:00
Sajith Sasidharan 82cd5a87fe Use DummyRequest in storage tests
Using twisted.web.server.Request causes test_new_style_classes to
fail like so:

  Traceback (most recent call last):
  Failure: testtools.testresult.real._StringException: Traceback (most recent call last):
    File ".tox/coverage/lib/python2.7/site-packages/allmydata/test/test_python2_regressions.py", line 69, in test_new_style_classes
      "Expected to find no classic classes.",
    File ".tox/coverage/lib/python2.7/site-packages/testtools/testcase.py", line 502, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = set([])
  actual    = set([<class allmydata.test.test_storage.JSONRequest at 0x7fd938040bb0>])
  : Expected to find no classic classes.

Seems that `DummyRequest` is an acceptable new style class.
2020-04-17 15:25:42 -04:00
Sajith Sasidharan b2b7061980 Refactor storage test helpers
Rewrite `renderSynchronously()` to use `renderDeferred()`
2020-04-17 15:25:42 -04:00
Sajith Sasidharan 72b8f72080 Add docstrings to storage test helpers 2020-04-17 15:25:42 -04:00
Sajith Sasidharan 8b7ef33b3d Remove redundant render_json() method 2020-04-17 15:25:42 -04:00
Sajith Sasidharan 3e7dea7dda Wrap renderer results in tags 2020-04-17 15:25:42 -04:00