Itamar Turner-Trauring
bdb4aac0de
Pass in the missing argument.
2022-08-17 13:15:27 -04:00
Itamar Turner-Trauring
92662d802c
Don't drop a Deferred on the ground.
2022-08-17 13:15:13 -04:00
Itamar Turner-Trauring
cd81e5a01c
Hint for future debugging.
2022-08-17 13:13:22 -04:00
Itamar Turner-Trauring
3464637bbb
Fix unit tests.
2022-08-17 12:54:26 -04:00
Itamar Turner-Trauring
9d03c476d1
Make sure we write all the bytes we say we're sending.
2022-08-17 12:49:45 -04:00
Itamar Turner-Trauring
c9084a2a45
Disable assertion we can't, sadly, enable.
2022-08-17 12:49:26 -04:00
Fon E. Noel NFEBE
7aa97336a0
Refactor FakeWebTest & MemoryConsumerTest classes
...
There are base test classes namely `SyncTestCase` and
`AsyncTestCase` which we would like all test classes in
this code base to extend.
This commit refactors two test classes to use the `SyncTestCase`
with the newer assert methods.
Signed-off-by: Fon E. Noel NFEBE <fenn25.fn@gmail.com>
2022-08-17 16:03:06 +01:00
Itamar Turner-Trauring
d50c98a1e9
Calculate URI extension size upfront, instead of hand-waving with a larger value.
2022-08-16 14:34:40 -04:00
Itamar Turner-Trauring
2e5662aa91
Temporarily enforce requirement that allocated size matches actual size of an immutable.
2022-08-16 13:11:06 -04:00
Itamar Turner-Trauring
555fa6e942
Merge remote-tracking branch 'origin/master' into 3902-listen-storage-http
2022-08-15 10:09:21 -04:00
Itamar Turner-Trauring
71b7e9b643
Support comma-separated multi-location hints.
2022-08-15 10:09:04 -04:00
Itamar Turner-Trauring
636b8a9e2d
Fix a bytes-vs-str bug.
2022-08-12 11:28:08 -04:00
Itamar Turner-Trauring
8b3280bf31
Simplify more.
2022-07-29 10:51:17 -04:00
Itamar Turner-Trauring
d4c73f19fe
A unittest for the metaclass.
2022-07-29 10:42:56 -04:00
Itamar Turner-Trauring
533d2a7ac9
Note Tor and I2P support.
2022-07-29 10:15:23 -04:00
Itamar Turner-Trauring
1cd2185be7
More cleanups.
2022-07-29 10:12:24 -04:00
Itamar Turner-Trauring
34518f9d0d
Fix lints.
2022-07-29 10:01:09 -04:00
Itamar Turner-Trauring
822b652d99
Improve factoring.
2022-07-29 09:57:18 -04:00
Itamar Turner-Trauring
21bb9e50f6
Merge remote-tracking branch 'origin/master' into 3902-listen-storage-http
2022-07-29 09:45:17 -04:00
Itamar Turner-Trauring
94e0568653
Actually we do need it.
2022-07-22 11:57:32 -04:00
Itamar Turner-Trauring
83f9c0788b
Use more direct API.
2022-07-22 11:56:18 -04:00
Itamar Turner-Trauring
be963e2324
Docstrings.
2022-07-22 11:55:33 -04:00
Itamar Turner-Trauring
2b3a8ddeec
Docstring.
2022-07-22 11:55:00 -04:00
Itamar Turner-Trauring
36b96a8776
Fix typo.
2022-07-22 11:53:28 -04:00
Itamar Turner-Trauring
f671b47a6d
Fix typo.
2022-07-22 11:53:12 -04:00
Itamar Turner-Trauring
5cd9ccfc6a
Slightly nicer handling for bad edge cases.
2022-07-22 11:52:56 -04:00
Itamar Turner-Trauring
981b693402
Make HTTPS protocols work with the protocol switcher magic.
2022-07-20 15:25:22 -04:00
Itamar Turner-Trauring
11f4ebc0d9
Hook up NURL generation to the new Foolscap/HTTPS protocol switch.
2022-07-20 15:12:29 -04:00
Itamar Turner-Trauring
5e0c32708b
Merge remote-tracking branch 'origin/master' into 3902-listen-storage-http
2022-07-20 14:48:26 -04:00
Itamar Turner-Trauring
d85b20b62d
Fix lint.
2022-07-20 12:47:18 -04:00
Itamar Turner-Trauring
da8a36fac9
Improve test coverage.
2022-07-20 12:07:46 -04:00
Itamar Turner-Trauring
69739f5f9b
Handle case where requested range results in empty response.
2022-07-20 11:42:01 -04:00
Itamar Turner-Trauring
43c6af6fde
More error handling for edge cases.
2022-07-20 11:28:14 -04:00
Itamar Turner-Trauring
1b8b71b306
Content-Range headers are now checked (somewhat) and the server now sends
...
correct headers when reading beyond the end.
2022-07-19 16:10:22 -04:00
Itamar Turner-Trauring
b3aff5c43b
More efficient implementations.
2022-07-19 14:37:46 -04:00
Itamar Turner-Trauring
49dfc8445c
Implementation of getting length of shares (albeit inefficiently for now).
2022-07-18 14:12:12 -04:00
Itamar Turner-Trauring
a24aefaebf
There can be up to 256 shares.
2022-07-15 11:35:28 -04:00
Itamar Turner-Trauring
87932e3444
Correct type.
2022-07-06 09:50:16 -04:00
Itamar Turner-Trauring
0b5132745d
A nicer interface.
2022-07-06 09:47:08 -04:00
Itamar Turner-Trauring
fd8a385d1d
Reformat with black.
2022-07-06 09:46:59 -04:00
Itamar Turner-Trauring
dac0080ea2
Make sure we update remaining length, and update test to catch the edge case
...
this fixes.
2022-07-06 09:40:46 -04:00
Itamar Turner-Trauring
5c5556d915
More robust usage.
2022-07-06 09:38:31 -04:00
Itamar Turner-Trauring
69c4dbf2b5
Fix tests and point to future work.
2022-07-05 17:17:38 -04:00
Itamar Turner-Trauring
6e3ca256b9
Some refactoring to handle edge cases better, in progress.
2022-07-05 15:36:21 -04:00
Itamar Turner-Trauring
3270d24c45
Slight simplification.
2022-07-05 11:30:48 -04:00
Itamar Turner-Trauring
1e6864ac01
Typo.
2022-07-05 11:30:01 -04:00
Itamar Turner-Trauring
97d0ba23eb
Switch to hypothesis-based test.
2022-07-05 11:21:46 -04:00
Itamar Turner-Trauring
249f431849
Use MonkeyPatch instead of MockPatch, since we're not mocking.
2022-07-05 11:14:52 -04:00
Itamar Turner-Trauring
f2acf71998
Document next steps: NURL generation.
2022-06-30 15:58:52 -04:00
Itamar Turner-Trauring
70dfc44841
Fix for 3905.
2022-06-30 15:45:30 -04:00
Itamar Turner-Trauring
3db6080f6d
Make the factories a class-level attribute.
2022-06-30 15:18:22 -04:00
Itamar Turner-Trauring
1798966f03
Store the tub on the subclass, since we'll want it (or rather its Listeners) for
...
NURL construction.
2022-06-30 14:53:37 -04:00
Itamar Turner-Trauring
d1bdce9682
A nicer API.
2022-06-30 14:26:36 -04:00
Itamar Turner-Trauring
03c515191e
Better docs.
2022-06-30 14:21:43 -04:00
Itamar Turner-Trauring
451e68795c
Lints, better explanation.
2022-06-30 13:54:58 -04:00
Itamar Turner-Trauring
bee46fae93
Resource limits on the client side.
2022-06-30 13:48:33 -04:00
Itamar Turner-Trauring
ab80c0f0a1
Set some length limits on various queries lengths.
2022-06-30 13:35:30 -04:00
Itamar Turner-Trauring
0e8f2aa702
More memory usage reductions.
2022-06-29 13:58:05 -04:00
Itamar Turner-Trauring
520456bdc0
Add streaming to CBOR results.
2022-06-29 11:26:25 -04:00
Itamar Turner-Trauring
efe9575d28
Nicer testing infrastructure so you don't have to switch back and forth between
...
sync and async test APIs.
2022-06-29 11:25:28 -04:00
Itamar Turner-Trauring
6dd2b2d583
More streaming, with tests passing again.
2022-06-27 17:00:24 -04:00
Itamar Turner-Trauring
06eca79263
Minimal streaming implementation.
2022-06-27 14:12:17 -04:00
Itamar Turner-Trauring
bfd54dc6ea
Switch to newer attrs API, for consistency across the module.
2022-06-27 11:30:49 -04:00
Itamar Turner-Trauring
1154371d22
Clarifying comments.
2022-06-23 12:51:07 -04:00
Itamar Turner-Trauring
01d8cc7ab6
Put the attribute on the correct object.
2022-06-23 12:49:07 -04:00
Itamar Turner-Trauring
eb1e48bcc3
Add a timeout.
2022-06-23 12:47:33 -04:00
Itamar Turner-Trauring
0c99a9f7b0
Make it more accurate.
2022-06-23 12:44:17 -04:00
Itamar Turner-Trauring
d70f583172
More cleanups.
2022-06-23 12:43:46 -04:00
Itamar Turner-Trauring
026d63cd6a
Fix some mypy warnings.
2022-06-23 12:41:47 -04:00
Itamar Turner-Trauring
d86f8519dc
Simplify implementation.
2022-06-23 12:41:01 -04:00
Itamar Turner-Trauring
04156db74e
Delay Negotiation.connectionMade so we don't create unnecessary timeouts.
2022-06-23 12:32:43 -04:00
Itamar Turner-Trauring
1579530895
Add working HTTP support.
2022-06-23 07:59:43 -04:00
Itamar Turner-Trauring
c5724c1d0a
Clarify.
2022-06-22 14:20:42 -04:00
Itamar Turner-Trauring
7577d1e24c
Sketch of HTTP support, still untested WIP.
2022-06-22 14:19:29 -04:00
Itamar Turner-Trauring
7910867be6
It actually works(?!) now.
2022-06-22 10:23:23 -04:00
Itamar Turner-Trauring
e1daa192fb
Sketch of protocol switcher experiment.
2022-06-21 17:20:08 -04:00
Itamar Turner-Trauring
d37f187c07
Lint fix.
2022-06-08 13:56:23 -04:00
Itamar Turner-Trauring
db42651355
Be more consistent and just always write to the request in read_range
.
2022-06-08 13:55:47 -04:00
Itamar Turner-Trauring
00381bc24f
Correction now that it does more than what it did before.
2022-06-08 13:52:45 -04:00
Itamar Turner-Trauring
c3a304e1cc
Lint and mypy fixes.
2022-06-06 11:04:34 -04:00
Itamar Turner-Trauring
85774ced95
Run shared tests on mutables too, with appropriate fixes to the tests and the server.
2022-06-06 10:57:19 -04:00
Itamar Turner-Trauring
e6efb62fd1
Refactor immutable tests so they can shared with mutables.
2022-06-06 10:25:06 -04:00
Itamar Turner-Trauring
797f34aec3
More tests.
2022-06-06 09:59:12 -04:00
Itamar Turner-Trauring
3e67d2d789
More tests.
2022-06-06 09:50:36 -04:00
Itamar Turner-Trauring
f1384096fa
First unit test for mutables.
2022-06-03 13:46:23 -04:00
Itamar Turner-Trauring
fd306b9a61
Share more code across mutable and immutable reads.
2022-06-01 13:54:54 -04:00
Itamar Turner-Trauring
2313195c2b
Reduce duplication.
2022-05-20 11:43:42 -04:00
Itamar Turner-Trauring
63624eedec
Reduce code duplication.
2022-05-20 11:33:02 -04:00
Itamar Turner-Trauring
12927d50ba
Type annotation improvements.
2022-05-20 11:10:18 -04:00
Itamar Turner-Trauring
8c8ea4927f
Switch to public API.
2022-05-20 11:07:55 -04:00
Itamar Turner-Trauring
d209065a6e
Fix type issue, and modernize slightly.
2022-05-16 11:22:44 -04:00
Itamar Turner-Trauring
a54b443f9d
It's not an immutable client anymore.
2022-05-12 09:44:30 -04:00
Itamar Turner-Trauring
f3cf13154d
Setup HTTP lease APIs for immutables too.
2022-05-11 12:00:27 -04:00
Itamar Turner-Trauring
b8735c79da
Fix docstring.
2022-05-11 11:50:29 -04:00
Itamar Turner-Trauring
821bac3ddf
Test another lease edge case.
2022-05-11 11:50:01 -04:00
Itamar Turner-Trauring
17fc9d0064
Merge branch '3891-mutable-http-protocol-part-2' into 3893-mutable-http-protocol-part-3
2022-05-11 11:22:03 -04:00
Itamar Turner-Trauring
457db8f992
Get rid of the "no such storage index" edge case, since it's not really necessary.
2022-05-11 11:17:57 -04:00
Itamar Turner-Trauring
4b62ec082b
Match Foolscap behavior for slot_readv of unknown storage index.
2022-05-11 11:11:24 -04:00
Itamar Turner-Trauring
6d412a017c
Type annotation.
2022-05-11 11:00:46 -04:00
Itamar Turner-Trauring
07e16b80b5
Better name.
2022-05-11 11:00:05 -04:00