Commit Graph

7771 Commits

Author SHA1 Message Date
Jean-Paul Calderone
5e58b62979 Add a test for negative offset or length to MutableShareFile.readv 2021-10-18 20:22:52 -04:00
Jean-Paul Calderone
df64bbb1e4 fail to encode the lease count *before* changing anything
This preserves the failure behavior - `struct.error` is raised - but leaves
the actual share file contents untouched if the new lease count cannot be
encoded.

There are still two separate write operations so it is conceivable that some
other problem could cause `write_lease_record` to happen but
`write_encoded_num_leases` not to happen.  As far as I can tell we have
severely limited options for addressing that problem in general as long as
share files are backed by a POSIX filesystem.

However, by removing the failure mode that depends on user input, it may be
that this is all that is needed to close the *security* hole.
2021-10-18 20:17:41 -04:00
Jean-Paul Calderone
f60bbbd3e2 make it possible to test this behavior of add_lease 2021-10-18 20:17:41 -04:00
Itamar Turner-Trauring
b7be91e3d0 First test for leases. 2021-10-18 13:17:07 -04:00
Itamar Turner-Trauring
2b40610a27 "Server" is extremely ambiguous, so let's just call this a client, which it is. 2021-10-18 12:55:30 -04:00
Itamar Turner-Trauring
58112ba75b Plan of implementation for lease tests. 2021-10-18 12:50:29 -04:00
Jean-Paul Calderone
1c347c5931 replace sensitive introducer fURL with path where it can be found 2021-10-18 08:05:40 -04:00
Jean-Paul Calderone
ad216e0f23 remove unused import 2021-10-15 13:13:37 -04:00
Jean-Paul Calderone
0611af6b0b Stop passing even a dummy value for control tub into Nodes 2021-10-15 13:10:18 -04:00
Jean-Paul Calderone
fe2e2cc1d6 Get rid of the control service 2021-10-15 12:12:19 -04:00
Jean-Paul Calderone
1de480dc37 Stop offering an API to create a control tub or handling the control tub 2021-10-15 12:12:03 -04:00
Jean-Paul Calderone
ddf5f461bf Stop half-pretending to have a control port 2021-10-15 12:11:53 -04:00
Jean-Paul Calderone
e0312eae57 stop creating a control tub for client nodes 2021-10-15 12:02:24 -04:00
Jean-Paul Calderone
95b765e309 stop creating a control tub for the introducer 2021-10-15 11:54:18 -04:00
Itamar Turner-Trauring
e099bc6736 Tests for IStorageServer.advise_corrupt_share. 2021-10-14 12:52:56 -04:00
Itamar Turner-Trauring
22aab98fcf When callRemoteOnly as removed, these probably should've been changed to return
a Deferred.
2021-10-14 12:52:40 -04:00
Jean-Paul Calderone
efc9dc831b Revert "a stab at using setup.cfg and setuptools_scm"
This reverts commit 68e8e0a7d5.
2021-10-14 11:01:37 -04:00
Jean-Paul Calderone
68e8e0a7d5 a stab at using setup.cfg and setuptools_scm 2021-10-14 10:58:41 -04:00
Itamar Turner-Trauring
807363adc9 Reduce duplication. 2021-10-06 16:41:50 -04:00
Itamar Turner-Trauring
3cf09ef888 Merge remote-tracking branch 'origin/master' into 3798-bucket-write-abort-tests 2021-10-06 16:07:39 -04:00
Itamar Turner-Trauring
0a605530d8
Merge pull request #1134 from tahoe-lafs/3793-persistent-bucketwriter
Don't tie BucketWriter lifetime to Foolscap connection lifetime

Fixes ticket:3793
2021-10-06 16:07:17 -04:00
Itamar Turner-Trauring
f3ebc71410
Merge pull request #1133 from tahoe-lafs/3805-istorageserver-tests-slot-readv
IStorageServer tests: slot_readv

Fixes ticket:3805
2021-10-06 15:41:29 -04:00
Itamar Turner-Trauring
bf176144c5 Handle double-disconnect, should it happen by mistake. 2021-10-06 15:18:00 -04:00
Itamar Turner-Trauring
82cbce6b7e Better explanation. 2021-10-06 15:12:22 -04:00
Itamar Turner-Trauring
17a670dfb5 Test for aborting bucket upload. 2021-10-04 10:37:37 -04:00
Itamar Turner-Trauring
b09b7fd01b Merge branch '3793-persistent-bucketwriter' into 3798-bucket-write-abort-tests 2021-10-04 10:30:41 -04:00
Itamar Turner-Trauring
23fd11be43 Expand explanation. 2021-09-29 14:13:18 -04:00
Itamar Turner-Trauring
016d6b4530 Fix spurious type checking error. 2021-09-29 14:10:14 -04:00
Itamar Turner-Trauring
f8604e2394 Fix flakes. 2021-09-29 14:00:11 -04:00
Itamar Turner-Trauring
58d7e2f627 Simplify implementation. 2021-09-29 13:58:53 -04:00
Itamar Turner-Trauring
8fb6afee1b Refactor BucketWriters such that disconnection can be limited Foolscap. 2021-09-29 13:42:17 -04:00
Itamar Turner-Trauring
a4153b7125 Implementation plan. 2021-09-29 11:56:04 -04:00
Itamar Turner-Trauring
51e8b5e197 Disconnection test works now. 2021-09-29 11:17:33 -04:00
Itamar Turner-Trauring
45c564f3c8
Merge pull request #1131 from tahoe-lafs/3797-istorageserver-tests-part-3
IStorageServer tests, part 3: slot_testv_and_writev_and_readv

Fixes ticket:3797
2021-09-29 10:28:42 -04:00
meejah
0a072a98c8
Merge pull request #1125 from hacklschorsch/3786.openmetrics
3786 Add OpenMetrics (Prometheus) statistics endpoint
2021-09-28 13:21:46 -06:00
Itamar Turner-Trauring
e64c397fc5 WIP disconnection test. 2021-09-28 13:51:31 -04:00
Itamar Turner-Trauring
a02d5f4c9c Just stick to current behavior. 2021-09-28 13:02:01 -04:00
Itamar Turner-Trauring
9970559019 Tests for slot_readv. 2021-09-28 10:46:21 -04:00
Itamar Turner-Trauring
fadfbcad99
Merge pull request #1130 from tahoe-lafs/3801-no-overlapping-writes-immutable-upload
Disallow conflicting overlapping writes when doing an immutable upload.

Fixes ticket:3801
2021-09-28 10:37:56 -04:00
Itamar Turner-Trauring
c668e342c2 More STARAW tests. 2021-09-28 09:54:13 -04:00
Itamar Turner-Trauring
914ca56775 TODOs. 2021-09-27 17:05:03 -04:00
Itamar Turner-Trauring
9f80435b41 Update to new interface. 2021-09-27 17:04:22 -04:00
Itamar Turner-Trauring
da363d54de Merge remote-tracking branch 'origin/master' into 3797-istorageserver-tests-part-3 2021-09-27 17:03:05 -04:00
Itamar Turner-Trauring
eb5b6c557e
Merge pull request #1127 from tahoe-lafs/3799-simplify-IStorageServer
Rip out unnecessary operator logic, and simplify IStorageServer

Fixes ticket:3799
2021-09-27 16:57:16 -04:00
Itamar Turner-Trauring
de1a7d7fce A more explicit test for successful overlapping. 2021-09-27 16:56:24 -04:00
Itamar Turner-Trauring
da937cef9e Correct docstring. 2021-09-27 15:04:04 -04:00
Itamar Turner-Trauring
1c10fa8c7f Merge remote-tracking branch 'origin/master' into 3799-simplify-IStorageServer 2021-09-27 15:02:09 -04:00
Itamar Turner-Trauring
b1b64c787e Add more randomness. 2021-09-27 15:00:52 -04:00
Itamar Turner-Trauring
0b1082fc04 Fix lint. 2021-09-24 12:04:12 -04:00
Itamar Turner-Trauring
c1f8e9f8c7 IStorageServer test for overlapping writes. 2021-09-24 12:02:30 -04:00
Itamar Turner-Trauring
6ef3811112 Prevent conflicting overlapping writes. 2021-09-24 11:54:08 -04:00
Itamar Turner-Trauring
1ff4e61e41 Low-level tests for conflicting and non-conflicting writes. 2021-09-24 10:49:27 -04:00
Itamar Turner-Trauring
4f7727df04 Merge remote-tracking branch 'origin/master' into 3795-istorageserver-tests-part-2 2021-09-23 14:20:44 -04:00
Itamar Turner-Trauring
ec6dfb8297 Re-enable test. 2021-09-23 14:20:34 -04:00
Jean-Paul Calderone
2f60ab300b black formatting 2021-09-23 07:48:27 -04:00
Jean-Paul Calderone
4b6d00221e protect this crazy line from black 2021-09-23 07:48:19 -04:00
Jean-Paul Calderone
f66a8ab136 formatting and explicit unicode string literals 2021-09-23 07:43:37 -04:00
Jean-Paul Calderone
cbb96bd57a one more docstring 2021-09-23 07:43:33 -04:00
Jean-Paul Calderone
4d8164773c factor helper function out to top-level 2021-09-23 07:43:18 -04:00
Jean-Paul Calderone
f8c07bfd11 add some docstrings 2021-09-23 07:42:59 -04:00
Jean-Paul Calderone
5e26f25b37 It's ported to Python 3! 2021-09-23 07:41:43 -04:00
Jean-Paul Calderone
c67c0727e6
Merge pull request #1103 from LeastAuthority/3525.test_status-no-mock
Remove usage of mock from allmydata/test/cli/test_status.py

Fixes: ticket:3525
2021-09-22 16:48:34 -04:00
Jean-Paul Calderone
198de5c648 Hoist the sys.stdout import to top level 2021-09-22 15:53:56 -04:00
Itamar Turner-Trauring
b835a671ce Merge remote-tracking branch 'origin/master' into 3795-istorageserver-tests-part-2 2021-09-21 15:09:49 -04:00
Itamar Turner-Trauring
4a9ff82533 Merge remote-tracking branch 'origin/master' into 3799-simplify-IStorageServer 2021-09-21 15:08:42 -04:00
Itamar Turner-Trauring
460b74e171 Punt overlapping writes for now. 2021-09-21 13:29:24 -04:00
Itamar Turner-Trauring
b7ae9a675f Merge remote-tracking branch 'origin/master' into 3784-istorageserver-test-suite 2021-09-21 13:20:53 -04:00
Jean-Paul Calderone
87113d6a13 Merge remote-tracking branch 'origin/master' into 3525.test_status-no-mock 2021-09-20 07:14:02 -04:00
Florian Sesser
e5e0d71ef5 OpenMetrics test suite: More clean ups
trailing whitespace
2021-09-17 13:20:59 +00:00
Florian Sesser
fb0335cc17 OpenMetrics test suite: More clean up
The Linter complains:
> 'testtools.matchers.Always' imported but unused
2021-09-17 12:17:32 +00:00
Florian Sesser
a2378d0e70 OpenMetrics test suite: Make CI happy: No old style objects 2021-09-17 12:04:12 +00:00
Florian Sesser
5825b8bd42 OpenMetrics: rework test suite with exarkun 2021-09-16 15:58:04 +00:00
Itamar Turner-Trauring
e11e5dfbe6 Revert removal of length in IStorageServer. 2021-09-15 16:31:54 -04:00
Itamar Turner-Trauring
1d2073b8f8 Revert "This is unnecessary, empty vector list is fine too."
This reverts commit f109afa3b1.
2021-09-15 16:19:24 -04:00
Florian Sesser
b0e1cf924d OpenMetrics test: White space only: Format JSON fixture to be easier on the eyes 2021-09-15 15:14:29 +00:00
Itamar Turner-Trauring
911a5e2ed1 Rip out server-side usage of operators other than eq, because nothing ever used them. 2021-09-15 11:07:02 -04:00
Itamar Turner-Trauring
f109afa3b1 This is unnecessary, empty vector list is fine too. 2021-09-15 10:51:43 -04:00
Itamar Turner-Trauring
8633432980 Switch IStorageServer interface to be slightly different than RIStorageServer. 2021-09-15 10:33:51 -04:00
Itamar Turner-Trauring
d210062dd7 Another test for STARAW. 2021-09-15 09:47:16 -04:00
Florian Sesser
383ab4729a OpenMetrics tests: Tryfix resolve TypeError on CI
Was:
> TypeError: unbound method render_OPENMETRICS() must be called with Statistics instance as first argument (got FakeStats instance instead)
2021-09-15 11:53:48 +00:00
Florian Sesser
6bcff5472b OpenMetrics test suite: Add a check to see whether our stats were parsed at all. 2021-09-15 11:50:20 +00:00
Florian Sesser
21c471ed81 OpenMetrics test: Add hopefully more stable URIs to OpenMetrics spec info 2021-09-15 11:39:32 +00:00
Florian Sesser
cbe5ea1115 OpenMetrics: Add docstring 2021-09-15 11:28:39 +00:00
Florian Sesser
c66ae302c8 OpenMetrics: Extra newline at the end 2021-09-15 11:27:44 +00:00
Florian Sesser
57a3c1168e OpenMetrics: Use list of strings instead of string concatenation 2021-09-15 11:03:31 +00:00
Florian Sesser
88a2e7a4fb OpenMetrics test suite: Get rid of status mock 2021-09-15 10:09:55 +00:00
Itamar Turner-Trauring
241f4c841b Another test. 2021-09-14 13:00:29 -04:00
Itamar Turner-Trauring
98e566fc44 Expand testing scope. 2021-09-14 12:51:32 -04:00
Itamar Turner-Trauring
7b97ecfb7c More tests. 2021-09-14 12:47:03 -04:00
Itamar Turner-Trauring
aa8001edf2 Another test. 2021-09-14 12:30:45 -04:00
Itamar Turner-Trauring
5b704ff12d Another mutable test. 2021-09-14 11:36:12 -04:00
Itamar Turner-Trauring
d207c46855 First mutable test. 2021-09-14 11:26:23 -04:00
Itamar Turner-Trauring
f40b7be562 Merge branch '3784-istorageserver-test-suite' into 3797-istorageserver-tests-part-3 2021-09-14 09:42:52 -04:00
Itamar Turner-Trauring
bb626890ed Match review comment suggestions from previous PR. 2021-09-14 08:57:32 -04:00
Itamar Turner-Trauring
c2c75b5e8e Merge branch '3784-istorageserver-test-suite' into 3795-istorageserver-tests-part-2 2021-09-14 08:49:58 -04:00
Itamar Turner-Trauring
87555ae3e4 Add missing __future__ imports. 2021-09-13 15:51:57 -04:00
Itamar Turner-Trauring
9cea3580c8 Merge remote-tracking branch 'origin/master' into 3795-istorageserver-tests-part-2 2021-09-13 10:14:35 -04:00
Itamar Turner-Trauring
8294c2d562 Merge branch '3784-istorageserver-test-suite' into 3795-istorageserver-tests-part-2 2021-09-13 10:13:08 -04:00
Itamar Turner-Trauring
9ce7cce712 Refactor SystemTestMixin into its own module. 2021-09-13 10:10:07 -04:00
Itamar Turner-Trauring
977b6065b1 Match actual behavior. 2021-09-13 09:50:38 -04:00