Brian Warner
6be91e369c
test_web: replace shouldReplace2 with shouldReplaceTo
...
This removes many uses of self.POST (since shouldReplaceTo does its own
HTTP), which will make it easier to remove client.getPage from POST.
2017-07-27 16:31:44 -07:00
Brian Warner
4745239c2c
test_web: use inlineCallbacks in many functions
...
specifically everywhere we use self.shouldRedirect2
2017-07-27 16:31:44 -07:00
Brian Warner
73d09082d7
test_web.web.Web.POST: split out build_form() helper function
2017-07-27 16:31:44 -07:00
Brian Warner
202a9714c4
test_web test_bad_method: remove a client.getPage
...
Add WebErrorMixin.assertHTTPError, to replace (getPage + shouldHTTPError)
2017-07-27 16:31:44 -07:00
Brian Warner
bee05e883c
test_web: remove HTTPClientGETFactory
...
This also changes the tests to handle the new API: URL can be unicode, and
the returned Headers object is not a dictionary.
2017-07-27 16:31:44 -07:00
Brian Warner
5a895b5fb6
GridTestMixin.GET: use treq instead of HTTPClientGETFactory
2017-07-27 16:31:44 -07:00
Brian Warner
3311f9520d
test.cli.test_status: replace getPage with treq
2017-07-27 16:31:44 -07:00
Brian Warner
bd1e4507ee
remove unused HTTPClientHEADFactory
2017-07-27 16:31:44 -07:00
Brian Warner
d018a07bf0
Merge PR430: add JSON welcome page
...
closes ticket:2476
2017-07-27 15:59:03 -07:00
Jean-Paul Calderone
e32f581d07
Get rid of the reliance on rref
...
It provides information more correctly obtained from
get_connection_status().
2017-07-27 16:31:41 -04:00
Jean-Paul Calderone
1f16a173f0
flatten the result structure
...
flat is better than nested
2017-07-27 15:32:47 -04:00
Jean-Paul Calderone
e0ee726d22
Update to the format the code now actually produces
2017-07-27 15:28:29 -04:00
Jean-Paul Calderone
7027547ecc
fix buggy test; restructure data
...
scared about duplicate nodeids in the data getting lost, switch to a list
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
754304e4d5
Switch Root over to MultiFormatPage
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
f518c2a521
Switch over to stdlib json
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
e339130e63
Just make an assertion against the full value
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
e3e49632a5
use preferred spelling for new assertions
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
780a932122
consistent markup
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
7b88cf376b
remove duplicate "above"
2017-07-27 15:26:30 -04:00
Jean-Paul Calderone
cc0e6ea6f9
typo fix
2017-07-27 15:26:30 -04:00
David Stainton
2006e6ae41
docs: add explaination of json welcome fields
2017-07-27 15:26:29 -04:00
David Stainton
cd97f8519b
web test: get_version should use a version string
2017-07-27 15:26:29 -04:00
David Stainton
923363c0d6
web test: test for server key in json welcome
2017-07-27 15:26:29 -04:00
David Stainton
16e56611f3
web: set json welcome content type to json utf8
2017-07-27 15:26:29 -04:00
David Stainton
a87822e66b
Add note about json welcome page to api docs
2017-07-27 15:26:29 -04:00
David Stainton
ecb6651926
Add basic unit test for json welcome page
2017-07-27 15:26:29 -04:00
David Stainton
876a7b6602
Fix indention
2017-07-27 15:26:29 -04:00
David Stainton
ad66caeaff
Make sure server.rref is not None
2017-07-27 15:26:29 -04:00
David Stainton
180975b0af
Make sure version is not None
2017-07-27 15:26:29 -04:00
David Stainton
b2d4374976
Add more server info to welcome json page
2017-07-27 15:26:29 -04:00
David Stainton
32110bfc68
Add storage and introducer summaries to json welcome output
2017-07-27 15:26:29 -04:00
David Stainton
822ed78b13
Add rough sketch of json welcome page
2017-07-27 15:26:29 -04:00
Jean-Paul Calderone
0d278e357d
Merge PR429: refactor response format selection logic
...
Factor out the logic for detecting a query argument in an HTTP request
selecting an alternate response format. Use the resulting helper
throughout to reduce duplication for this feature.
Closes ticket:2893
2017-07-27 15:22:21 -04:00
Jean-Paul Calderone
1e885fa40b
Convert storage.py over to MultiFormatPage
2017-07-27 13:57:02 -04:00
Jean-Paul Calderone
6e4c4b7abc
Convert status.py over to MultiFormatPage
2017-07-27 13:57:02 -04:00
Jean-Paul Calderone
5a30bd6169
Convert introweb.py over to MultiFormatPage
2017-07-27 13:57:02 -04:00
Jean-Paul Calderone
0581ce7270
Convert directory.py over to MultiFormatPage
2017-07-27 13:57:02 -04:00
Jean-Paul Calderone
7c8c63a01f
a helper for the ?t=json resources
2017-07-27 13:57:02 -04:00
Jean-Paul Calderone
7cad9e1b5d
Merge PR432: improve servers of happiness integration test
...
The node creation helper used by the integration tests is now more careful about how it tweaks additional configuration file fields. Previously, it could easily clobber certain settings. Now it should only introduce the specific changes it intends.
Closes ticket:2895
2017-07-27 12:18:42 -04:00
Jean-Paul Calderone
b481fc46f6
go back to happy=7
...
now that there are only 5 storage servers instead of 8 as expected
2017-07-26 11:30:02 -04:00
Jean-Paul Calderone
86b48960e3
pyflakes cleanups
2017-07-26 11:29:47 -04:00
Jean-Paul Calderone
dece729857
refactor to remove unnecessary negation
...
also add missing import!
2017-07-26 11:29:15 -04:00
Jean-Paul Calderone
a8917d553c
rewrite the config file more safely
...
use cli options for whatever we can
use the config apis for the other thing
this avoids clobbering configuration we don't know about -
such as the storage=False setting (which made all nodes storage servers).
2017-07-26 10:49:43 -04:00
Brian Warner
1d1653d361
Merge branch '2857-deprecations'
2017-07-23 12:00:03 -05:00
Brian Warner
ad92b2b9b2
test_web: replace HEAD/PUT/DELETE with treq
2017-07-12 17:10:49 -07:00
Brian Warner
486fca0d5c
web.test_introducer: replace getPage with treq
2017-07-12 17:10:49 -07:00
Brian Warner
8be5072fca
test_system: replace getPage with treq
2017-07-12 17:10:49 -07:00
Brian Warner
2ec3791411
test_deepcheck: replace t.w.client.getPage with treq
2017-07-12 17:10:46 -07:00
Brian Warner
dc6398d265
setup.py: depend on 'treq' for [test]
2017-07-12 17:07:27 -07:00
Brian Warner
74e7ef4b98
test_happiness: limit string sizes to 30 chars
...
I think these are supposed to represent share ids or server ids, so we don't
need to exercise them being too huge.
2017-07-12 16:37:44 -07:00