Brian Warner
05317d4d12
test_web: replace all shouldHTTPError with assertHTTPError
...
and update to inlineCallbacks while we're in there
2017-07-27 16:31:44 -07:00
Brian Warner
2687ee90c5
test_web: remove last traces of deprecated client.getPage
2017-07-27 16:31:44 -07:00
Brian Warner
965e974ce8
test_web: fix POST(url,body) calls that should have been POST2()
...
and remove the followRedirect= argument from POST
2017-07-27 16:31:44 -07:00
Brian Warner
0deb903888
test_web: rewrite all POST(followRedirect=True) calls with do_http
...
Since POST() is about to lose followRedirect=True
2017-07-27 16:31:44 -07:00
Brian Warner
3f03367d2f
test_web: remove all other uses of shouldRedirect
2017-07-27 16:31:44 -07:00
Brian Warner
76063b1c12
test_web: replace some instances of shouldRedirect with shouldRedirectTo
2017-07-27 16:31:44 -07:00
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
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
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
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
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
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
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
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
Brian Warner
11c39325fb
test_happiness: suppress the hypothesis 'too_slow' check
...
I was seeing buildbot failures where the host machine was too busy, and
hypothesis was spooked into thinking that data generation was too slow.
2017-07-12 16:27:13 -07:00
meejah
0977e52cbf
Add a test for 'tahoe list-aliases --readonly-uri'
2017-06-06 18:03:05 +01:00
Daira Hopwood
d3acf82776
Rename FilesystemOptions to FileStoreOptions. refs #2345
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-06 11:20:49 +01:00
Daira Hopwood
2055a66cf2
Doc changes that require more careful review. refs #2345
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-06 11:20:49 +01:00
Daira Hopwood
4723af6e2f
LAFS now stands for "Least-Authority File Store" rather than "Least-Authority File System". refs #2345
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-06 11:20:49 +01:00
meejah
05f48c3601
Various cleanups, fixes and improvements
...
Squashed all commits that were meejah's between
30d68fb499f300a393fa0ced5980229f4bb6efda
and
33c268ed3a8c63a809f4403e307ecc13d848b1ab
On the branch meejah:1382.markberger-rewrite-rebase.6 as
per review
2017-06-05 16:31:41 -06:00
David Stainton
19c5bbb43b
Fix test test_lost_servers
...
Remove old hypothesis tests
Fix allmydata.test.cli.test_cli.Errors.test_get
this was broken due to differing share placements
whereas we need to allow this.
Fix test_5_overdue_immutable
This change makes the test not depend on the value
of PYTHONHASHSEED.
Revert "Fix test_5_overdue_immutable"
This reverts commit 5f3696d9a53e7df8781a2c463c7112282397cd69.
fix test to actually hang the first 5 *servers*
sort keys for stable output
use file-context-managers
remove probably-unneeded assert (that fails sometimes)
another non-deterministic test?
2017-06-05 16:26:46 -06:00
meejah
56f6dbd363
distribute only to read/write peers
...
correctly calculate happiness
guard with except
fix tests, and happiness calculation
remove debug
fix placements to None
happiness calc shouldn't have to filter None
WIP fixing some tests etc
2017-06-05 16:26:46 -06:00
David Stainton
a611673934
Make a correction to a hypothesis test comment
...
Comment out all debug print statements
Add hypothesis tests for the old servers of happiness implementation
Attempt to speed up meejah's servers of happiness
WIP
Fix test_calc_happy
WIP
2017-06-05 16:26:46 -06:00