Commit Graph

7793 Commits

Author SHA1 Message Date
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
Itamar Turner-Trauring
86ea3ca408 Demonstrate that last write wins. 2021-09-13 09:49:27 -04:00
Itamar Turner-Trauring
e96c22914b Fix typo. 2021-09-13 09:43:53 -04:00
Itamar Turner-Trauring
d04cd13b37 Actual test for get_version(). 2021-09-13 09:43:29 -04:00
Itamar Turner-Trauring
a482f216a1 Use more reproducible "random" numbers. 2021-09-13 09:40:32 -04:00
Itamar Turner-Trauring
b01c5c7454 Clarify argument names. 2021-09-13 09:35:52 -04:00
Itamar Turner-Trauring
2eafe41270
Merge pull request #1117 from tahoe-lafs/3779-istorageserver-with-fewer-assumptions
Reduce implementation-dependency of `IStorageServer`

Fixes ticket:3779
2021-09-13 09:28:46 -04:00
Itamar Turner-Trauring
1fa0f72c8e Use AsyncTestCase. 2021-09-13 09:28:03 -04:00
Itamar Turner-Trauring
b0d635c9c9 Use skip decorator. 2021-09-13 09:15:20 -04:00
Jean-Paul Calderone
7ea994776d
Merge pull request #1114 from Fenn-CS/3781.remove-incomplete-cli-warning-python3
Python 3 support complete, so removed warning

Fixes: ticket:3781
2021-09-10 12:15:33 -04:00
Itamar Turner-Trauring
ac9875da75 Add explanation to new error logging. 2021-09-10 11:39:48 -04:00
Itamar Turner-Trauring
570f15284a More tests for IStorageServer.get_buckets(). 2021-09-10 09:44:49 -04:00
Florian Sesser
ad84f5df2b newline at the end. 2021-09-10 13:21:06 +00:00
Florian Sesser
339e1747e7 clean up 2021-09-10 13:15:56 +00:00
Florian Sesser
6c18983f7b OpenMetrics test: Use realistic input data 2021-09-10 13:13:13 +00:00
Florian Sesser
d04157d18a OpenMetrics test: Add parser to check against spec 2021-09-10 13:00:15 +00:00
Florian Sesser
fca1482b35 OpenMetrics Tests WIP 2021-09-10 00:10:11 +00:00
Florian Sesser
30771149fc Openmetrics: Add test case scaffold 2021-09-09 23:31:39 +00:00
Florian Sesser
d05e373d42 OpenMetrics: All strings are unicode. 2021-09-09 13:57:59 +00:00
Florian Sesser
4674bccde7 OpenMetrics: add trailing EOF marker 2021-09-09 13:54:03 +00:00
Jean-Paul Calderone
3e3fd1aa75 on Windows, Python 3 wants to play 2021-09-08 14:25:30 -04:00
Itamar Turner-Trauring
a2d54aa8bc .todo isn't working on Python 2 for some reason. 2021-09-08 14:14:36 -04:00
Itamar Turner-Trauring
44388037df Flakes, and closer to passing on Python 2. 2021-09-08 14:12:32 -04:00
Itamar Turner-Trauring
c1b1ed0dc3 More tests. 2021-09-08 13:52:34 -04:00
Jean-Paul Calderone
88d3ee5785 debug print 2021-09-08 13:43:47 -04:00
Itamar Turner-Trauring
3bec2a480f Start on allocate_bucket tests. 2021-09-08 12:20:27 -04:00
Itamar Turner-Trauring
855d02bef0 Start thinking about immutable tests. 2021-09-08 11:26:52 -04:00
Florian Sesser
ca865e60db OpenMetrics endpoint 2021-09-08 15:08:25 +00:00
Florian Sesser
2dbb9434b0 OpenMetrics endpoint WIP 2021-09-08 14:54:57 +00:00
Jean-Paul Calderone
8ca1f8c335 Python 3 is grumpy that it doesn't get to play
Fool it
2021-09-07 16:19:15 -04:00
Jean-Paul Calderone
24e7dcfcd8 Let me write unicode to stdout on Python 2 2021-09-07 16:10:10 -04:00
Jean-Paul Calderone
4db8c2209b lint 2021-09-07 15:17:18 -04:00
Jean-Paul Calderone
5a238c4f07 Nope, that doesn't sound like an enhancement at all. 2021-09-07 15:12:24 -04:00
Jean-Paul Calderone
e9b6d64c51 Merge remote-tracking branch 'origin/master' into 3525.test_status-no-mock 2021-09-07 14:24:13 -04:00
Itamar Turner-Trauring
51b1e5624a Skeleton setting up the test infrastructure. 2021-09-03 14:04:10 -04:00
Itamar Turner-Trauring
148a0573de Replace colon on filename only, not on whole path.
This would break Windows logging of corruption reports, since colon would be removed from e.g. "C:".
2021-09-03 13:11:02 -04:00
Florian Sesser
8a64f50b79 WIP - Could be wronger 2021-09-03 14:40:42 +00:00
Itamar Turner-Trauring
789a7edb56 Get rid of more callRemoteOnly usage. 2021-09-02 15:21:42 -04:00
Itamar Turner-Trauring
63bfff19e9 Don't rely on Foolscap's semantics. 2021-09-02 15:05:15 -04:00
Itamar Turner-Trauring
6c679bd4e0 Stop using callRemoteOnly. 2021-09-02 11:35:39 -04:00
Itamar Turner-Trauring
597c9adebd Merge remote-tracking branch 'origin/master' into 3779-istorageserver-with-fewer-assumptions 2021-09-01 14:15:14 -04:00
Itamar Turner-Trauring
056ee58e91
Merge pull request #1110 from tahoe-lafs/3773.just-add-lease
Get rid of renew_lease client code, in order to simplify the protocol

Fixes ticket:3773
2021-09-01 10:44:41 -04:00
fenn-cs
cb81e13462 Merged masted
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-31 12:17:20 +01:00
Itamar Turner-Trauring
e6803670d1 Improve explanations. 2021-08-30 16:54:44 -04:00
Itamar Turner-Trauring
e408322c3d Use the correct APIs. 2021-08-30 16:51:36 -04:00
Itamar Turner-Trauring
7d32335353 Clarify and remove duplication. 2021-08-30 16:49:11 -04:00
Jean-Paul Calderone
bbc860fdb1
Merge pull request #937 from LeastAuthority/3528.test_cli-no-mock
Remove mock from test_cli

Fixes: ticket:3528
2021-08-30 14:30:27 -04:00
fenn-cs
342a1c2c31 Python 3 support complete, so removed warning
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-29 16:10:30 +01:00
Florian Sesser
52cb250701 This is the handler we need to create. 2021-08-27 16:42:23 +00:00
Itamar Turner-Trauring
3e0dc94497 Annotate the two fakes that (at least partially) implement RIStorageServer, so they're
easier to find.
2021-08-25 13:36:58 -04:00
Itamar Turner-Trauring
62a096dfe2 Merge remote-tracking branch 'origin/master' into 3773.just-add-lease 2021-08-24 12:22:21 -04:00
fenn-cs
117befd898 detect all port 0 configs
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-23 02:34:32 +01:00
Itamar Turner-Trauring
370d1ddafe Fix flake. 2021-08-20 08:20:24 -04:00
Itamar Turner-Trauring
59fab99d9d Nothing uses RIStorageServer.renew_lease, so removing it is simple. 2021-08-19 16:40:45 -04:00
Itamar Turner-Trauring
d599568c79 Tests validating that the operation for adding a lease will renew the lease
instead if it already exists.
2021-08-19 13:56:13 -04:00
Itamar Turner-Trauring
dfff187ad0 Make time pluggable to support better testing. 2021-08-19 13:23:01 -04:00
Jean-Paul Calderone
acc8cbd28b Remove use of the mock module from test_status 2021-08-12 16:50:01 -04:00
Jean-Paul Calderone
85ba6567ba Try to make sure fixed argv is used on Py27+Windows
Previous version that rebound sys.argv didn't work so well with early binding
used by some some functions for default argument values.
2021-08-12 12:11:39 -04:00
Jean-Paul Calderone
893d21fcbb Fix the UsageError closer in the Py2 codepath we already have for it 2021-08-11 16:46:29 -04:00
Jean-Paul Calderone
b56a956843 Sort out this gross error reporting encoding/decoding mess
A little, anyway
2021-08-11 15:42:21 -04:00
Jean-Paul Calderone
13dae392cb Go with a shorter name 2021-08-11 14:41:18 -04:00
Jean-Paul Calderone
6931d10ace Fix mis-merge: use argv parameter instead of sys.argv 2021-08-11 14:40:22 -04:00
Jean-Paul Calderone
975f268d8d Provide enough output to debug the failure 2021-08-11 14:39:32 -04:00
Jean-Paul Calderone
fd3d3bc688 Give the py3 static checker something to resolve unicode to
It's pretty much just a bug in the static checker. :/
2021-08-11 14:27:21 -04:00
Jean-Paul Calderone
1d75bbfd72 str is a kind of weird future thing; coerce another way 2021-08-11 14:25:47 -04:00
Jean-Paul Calderone
4d41e30ce9 Just pass unicode at this layer 2021-08-11 14:25:40 -04:00
Jean-Paul Calderone
d56c218586 Options are defined with unicode now; argv better be unicode. 2021-08-11 14:25:24 -04:00
Jean-Paul Calderone
0176583e75 Get a text-mode FilePath in a py3 compatible way 2021-08-11 13:32:04 -04:00
Jean-Paul Calderone
2244f0374e fail more informatively 2021-08-11 13:31:07 -04:00
Jean-Paul Calderone
5f6ae1f8f5 Fix mis-merge: don't try to stripe argv[0] twice 2021-08-11 13:30:52 -04:00
Jean-Paul Calderone
ffbcbf78a7 Send the warning to the parameterized stderr 2021-08-11 13:30:39 -04:00
Jean-Paul Calderone
9632b35abe Fix mismerge: Put Py3 warning back 2021-08-11 13:19:15 -04:00
Jean-Paul Calderone
15312009ce Fix mis-merge: This test moved to test_run.py 2021-08-11 12:58:51 -04:00
Jean-Paul Calderone
66d40527d1 Merge remote-tracking branch 'origin/master' into 3528.test_cli-no-mock 2021-08-11 12:56:00 -04:00
fenn-cs
a6b7c07e1c added missing parathensis, ran yapf
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-10 10:13:00 +01:00
fenn-cs
7ad3fa9e25 correct use of succeeded, remove trailing spaces and unused import
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-09 23:46:30 +01:00
fenn-cs
90e84730e5 Fixes 3757 : Refactored test_introducer in web tests to use custom base test cases
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2021-08-08 21:49:02 +01:00
Itamar Turner-Trauring
d060af641a Python 3 port is essentially done-get rid of relevant tests and tracking code. 2021-07-30 11:13:57 -04:00
Itamar Turner-Trauring
af49dcb89e On Python 2 we don't need to convert byte keys to unicode. 2021-07-05 16:35:06 -07:00