tpltnt
c5e8d83b73
removed old test/trial helper module
2018-01-04 22:09:52 +01:00
meejah
5f00842532
use exarkun's suggestion from review
2018-01-03 14:07:38 -07:00
meejah
e5d6272b62
use '5 years ago' instead of absolute timestamp
2017-12-20 13:17:54 -07:00
meejah
6c0c90829f
cheezy test for more coverage
2017-12-05 12:02:16 -07:00
meejah
87ad3cb8e9
fix 2880
...
- remember upload URI so we don't re-download
- account for empty files in "should_download"
- fix 'conflicted' asserts in tests
2017-12-05 12:02:16 -07:00
meejah
672475cb2b
Multiple magic-folders
...
This moves all magic-folder configs to a single YAML
file. We load legacy config fine and don't mess with
legacy config unless you use a magic-folder command that
changes the config.
Increase test coverage
2017-12-05 10:34:48 -07:00
meejah
1b6f477549
Pull "config" handling out of Node and hide node-derivitives
...
This includes:
- refactor to create_client and _Client
- refactor to _IntroducerNode and create_introducer
2017-11-20 12:57:20 -07:00
meejah
50f8397c99
Merge branch 'invalid-pidfile' into delete-invalid-pidfile--lpirl
...
Conflicts:
src/allmydata/scripts/startstop_node.py
src/allmydata/test/cli/test_cli.py
2017-11-08 14:49:29 -07:00
Brian Warner
a1711088ed
test_i2p_provider: exercise escaping of apiEndpoint attribute
2017-11-03 00:24:46 -07:00
Brian Warner
1f1afe65ec
tor_provider.get_listener(): return a real endpoint, instead of a descriptor
...
get_listener() is allowed to return either, and the Tor provider is currently
simple enough to not really need more than a basic descriptor, but have it
return a full Endpoint for use as an example of what I2P can do later.
2017-11-03 00:24:46 -07:00
Brian Warner
d713e0e57d
address review feedback: docstrings, better test class name
2017-11-03 00:24:46 -07:00
Brian Warner
097abb42fa
tahoe.cfg: add tub.port=listen:i2p (and/or listen:tor)
...
This delegates the construction of the server Endpoint object to the i2p/tor
Provider, which can use the i2p/tor section of the config file to add options
which would be awkward to express as text in an endpoint descriptor string.
refs ticket:2889 (but note this merely makes room for a function to be
written that can process I2CP options, it does not actually handle such
options, so it does not close this ticket yet)
2017-11-03 00:24:46 -07:00
Brian Warner
d1fd43aa4f
tor/i2p: rename create_onion/create_dest to create_config
2017-11-03 00:24:46 -07:00
meejah
263a3f43c1
stop chdir
2017-09-19 10:39:19 -06:00
meejah
9375056b61
Split up startstop_node and add 'tahoe daemonize'
...
This sets the stage for further changes to the startup
process so that "async things" are done before we create
the Client instance while still reporting early failures
to the shell where "tahoe start" is running
Also adds a bunch of test-coverage for the things that got
moved around, even though they didn't have coverage before
2017-09-19 10:39:19 -06:00
Lukas Pirl
89bacbb70a
Merge branch 'master' into invalid-pidfile
2017-08-24 18:40:00 +02:00
Lukas Pirl
46305c74e1
added test for (ignoring an) invalid PID file when starting a node
2017-08-24 17:56:57 +02:00
Jean-Paul Calderone
86f79e8111
Add a test for the non-numeric case
2017-08-24 16:46:46 +02:00
Jean-Paul Calderone
354567cb85
Add a test for the non-numeric case
2017-08-24 10:34:58 -04:00
Brian Warner
8dd0a5f772
dictutil: remove unused move, subtract, del_if_present
2017-08-12 21:48:05 -07:00
Brian Warner
61b85dbf78
dictutil: remove unused ValueOrderedDict
2017-08-12 21:34:24 -07:00
Brian Warner
4f493b1a03
remove unused UtilDict
2017-08-12 21:31:47 -07:00
Brian Warner
a76d9e084f
dictutil: remove unused NumDict
2017-08-12 21:21:04 -07:00
Brian Warner
3f2f7dfb05
dictutil: fix bug in str(ValueOrderedDict), and improve test coverage
...
It looks like str() was meant to truncate the dict, but a missing i+=1 meant
that it never actually did. I also changed the format to include a clear
"..." in case we truncate it, to avoid confusion with a non-truncated dict of
the same size.
This also improves test coverage in subtract() and
NumDict.item_with_largest_value().
refs ticket:2891
2017-08-10 10:27:02 -07:00
Brian Warner
95ac5494ff
test_backupdb: tolerate newer sqlite-3.20.0 error messages
2017-08-10 10:21:39 -07:00
meejah
798bf57e28
Add 'tahoe invite' and 'tahoe create-node --join' commands
...
This opens a wormhole and sends appropriate JSON down
it to a tahoe-gui using a wormhole server running on
tahoe-lafs.org
The other end uses the 'tahoe create-node' command (with
new --join option) to read the configuration JSON from
a 'tahoe invite' command
2017-08-08 18:27:06 -06:00
meejah
e2a5751d02
at least use random port
2017-08-08 10:42:11 -06:00
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
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
ecb6651926
Add basic unit test for json welcome page
2017-07-27 15:26:29 -04:00