Commit Graph

7771 Commits

Author SHA1 Message Date
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
Itamar Turner-Trauring
e0b4cf057e Fix logging of bytes in Foolscap on Python 3. 2021-07-05 16:03:24 -07:00
Itamar Turner-Trauring
7deec790a6
Merge pull request #1084 from tahoe-lafs/3736.frontends-auth-python-3
Port allmydata.frontend.auth to Python 3

Fixes ticket:3736
2021-06-23 09:04:48 -04:00
Itamar Turner-Trauring
83b4fb88f4
Merge pull request #1085 from tahoe-lafs/3738.failing-unicode-upload-regression-python-2
Fix bug where uploading files with Unicode filenames failed on Python 2

Fixes ticket:3738
2021-06-23 09:04:31 -04:00
Itamar Turner-Trauring
3f98349cd9 Limit Pickle protocol to version supported by Python 2. 2021-06-16 11:53:25 -04:00
Itamar Turner-Trauring
f778d25c44 Apply same fix to success path. 2021-06-15 14:05:49 -04:00
Itamar Turner-Trauring
e8308043e3 Method that doesn't break on Python 3. 2021-06-15 14:03:58 -04:00
Itamar Turner-Trauring
3461665ccf Get rid of annoying warning. 2021-06-15 13:56:34 -04:00
Itamar Turner-Trauring
d74ef0798d Fix quoting to work on Python 2. 2021-06-15 13:46:22 -04:00
Itamar Turner-Trauring
473654ccb7 Test demonstrating the problem. 2021-06-15 13:46:06 -04:00
Itamar Turner-Trauring
2447d09fc0 Port to Python 3. 2021-06-14 11:58:48 -04:00
Itamar Turner-Trauring
aa809669db Add a couple more tests for more complete coverage. 2021-06-14 11:51:18 -04:00
Itamar Turner-Trauring
f48cf88f35 Fix flake. 2021-06-03 09:45:29 -04:00
Itamar Turner-Trauring
293cea6fd2 Port to Python 3. 2021-06-03 09:40:11 -04:00
Itamar Turner-Trauring
279d6b6542 Port to Python 3. 2021-06-03 09:39:13 -04:00
Itamar Turner-Trauring
cb1e591c6e Port to Python 3. 2021-06-03 09:37:59 -04:00
Itamar Turner-Trauring
77676c1648 Port to Python 3. 2021-06-03 09:36:22 -04:00
Itamar Turner-Trauring
cf68f55039 Port to Python 3. 2021-06-03 09:34:42 -04:00
Itamar Turner-Trauring
58d6f9f6cf Port to Python 3. 2021-06-03 09:28:10 -04:00
Itamar Turner-Trauring
53482dd8ac Port to Python 3. 2021-06-03 09:26:24 -04:00
Itamar Turner-Trauring
a910ebcc8a Fix flakes. 2021-06-02 11:31:32 -04:00
Itamar Turner-Trauring
defe16f912 Port to Python 3. 2021-06-02 11:30:19 -04:00
Itamar Turner-Trauring
9804a44c50 Port to Python 3. 2021-06-02 11:19:45 -04:00