Commit Graph

7706 Commits

Author SHA1 Message Date
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
Itamar Turner-Trauring
61fdea9043 Port to Python 3. 2021-06-02 10:19:30 -04:00
Itamar Turner-Trauring
9d5f1ad735 Port to Python 3. 2021-06-02 10:14:59 -04:00
Itamar Turner-Trauring
464b7055c2 Port to Python 3. 2021-06-02 10:12:05 -04:00
Itamar Turner-Trauring
a0744ffa8c Don't shadow builtin. 2021-06-02 09:54:57 -04:00
Itamar Turner-Trauring
43138d16d1 Merge branch '3716.allmydata-scripts-python-3-part-1' into 3718.allmydata-scripts-python-3-part-2 2021-05-28 11:28:23 -04:00
Itamar Turner-Trauring
b509ff69fc Flake fix. 2021-05-28 11:25:16 -04:00
Itamar Turner-Trauring
64f6ccd17f Make --exclude-from behavior consistent, at the cost of a minor incompatibility. 2021-05-28 09:53:28 -04:00
Itamar Turner-Trauring
69c8305ae8 Flake fix. 2021-05-27 13:55:29 -04:00
Itamar Turner-Trauring
8be4acd7ec Faking sys.stdout doesn't go well since we lookup encoding attribute. 2021-05-27 13:54:37 -04:00
Itamar Turner-Trauring
eddd9550f0 Pass test. 2021-05-27 13:26:56 -04:00
Itamar Turner-Trauring
8aa3391276 Consistent behavior. 2021-05-27 13:26:46 -04:00
Itamar Turner-Trauring
0425b64041 Match current logic. 2021-05-27 13:26:23 -04:00
Itamar Turner-Trauring
49be6906c8 Fix test. 2021-05-27 13:07:56 -04:00
Itamar Turner-Trauring
d78e9d891d Passing test. 2021-05-27 11:40:59 -04:00
Itamar Turner-Trauring
741af0b0eb Fix imports. 2021-05-26 15:27:16 -04:00
Itamar Turner-Trauring
0a9b3a4003 Don't want pdb. 2021-05-26 15:17:57 -04:00
Itamar Turner-Trauring
827e2e1d03 Merge remote-tracking branch 'origin/master' into 3716.allmydata-scripts-python-3-part-1 2021-05-26 15:06:01 -04:00
Itamar Turner-Trauring
d967c6de98
Merge pull request #1067 from tahoe-lafs/3700.byteswarning-windows
Run (and pass) Python 3 unit tests on Windows

Fixes ticket:3700
Fixes ticket:3701
2021-05-26 14:43:50 -04:00
Itamar Turner-Trauring
7f70315c83 Skip tests on Python 3. 2021-05-25 14:49:44 -04:00
Itamar Turner-Trauring
52cd90941f Actually use the encoding. 2021-05-25 14:29:22 -04:00
Itamar Turner-Trauring
2c7a4c7e07 Try to fix Windows failure on Python 3. 2021-05-25 11:45:36 -04:00
Itamar Turner-Trauring
cf299684c2 Unneeded. 2021-05-25 10:40:44 -04:00
Itamar Turner-Trauring
8ca6a72396 Write out the file in an encoding that matches what the reader expects. 2021-05-24 10:50:49 -04:00
Itamar Turner-Trauring
0966ce17aa Try to fix on Windows. 2021-05-24 10:33:21 -04:00
Itamar Turner-Trauring
7e8e93200f Don't "fix" things on Python 3 that are already fixed. 2021-05-24 10:13:08 -04:00
Itamar Turner-Trauring
9e6915ca78 Not used. 2021-05-21 11:12:41 -04:00
Itamar Turner-Trauring
1e9dfd2fce Another test. 2021-05-21 11:01:17 -04:00
Itamar Turner-Trauring
bb74b7fe0c Note this code is buggy. 2021-05-21 11:01:00 -04:00
Itamar Turner-Trauring
01db931192 A test that doesn't really increase coverage much. Ideally this would test immutable directories to test caching logic, but that's too much of a pain. Since I already have this written, going to leave in cause why not. 2021-05-18 13:35:34 -04:00
Itamar Turner-Trauring
1fa6ce97e1 Merge remote-tracking branch 'origin/master' into 3714-cli-testing-coverage 2021-05-17 12:59:57 -04:00
Itamar Turner-Trauring
073f521cc1 WIP 2021-05-17 12:59:38 -04:00
Itamar Turner-Trauring
f73f601f67 Port to Python 3. 2021-05-17 10:35:16 -04:00
Itamar Turner-Trauring
693e98e3a7 Port to Python 3. 2021-05-17 10:05:44 -04:00
Itamar Turner-Trauring
1b87312652 Port to Python 3. 2021-05-17 09:58:59 -04:00
Itamar Turner-Trauring
bf133be195 Port to Python 3. 2021-05-17 09:56:13 -04:00
Itamar Turner-Trauring
1e0bf545ba Port to Python 3. 2021-05-17 09:47:07 -04:00
Itamar Turner-Trauring
c92bf72437 Add missing comma. 2021-05-17 09:36:43 -04:00
Itamar Turner-Trauring
e0cab75cc6 Merge branch '3709-even-more-integration-tests-python-3' into 3716.allmydata-scripts-python-3-part-1 2021-05-14 10:51:52 -04:00
Itamar Turner-Trauring
0655b02050 Port to Python 3. 2021-05-14 10:50:04 -04:00
Itamar Turner-Trauring
7c170317c0 Remove some cruft. 2021-05-14 10:41:53 -04:00
Itamar Turner-Trauring
e3f0795550 Port to Python 3. 2021-05-14 10:31:26 -04:00
Itamar Turner-Trauring
bcf2374dfe Port to Python 3. 2021-05-14 10:27:07 -04:00
Itamar Turner-Trauring
a2280b7660 Port to Python 3. 2021-05-14 10:22:07 -04:00
Itamar Turner-Trauring
66f53fada8 Port to Python 3. 2021-05-14 09:46:15 -04:00
Itamar Turner-Trauring
250ca3170d Port to Python 3. 2021-05-14 09:42:13 -04:00
Itamar Turner-Trauring
04058e942c
Merge branch 'master' into 3709-even-more-integration-tests-python-3 2021-05-14 09:31:20 -04:00
Itamar Turner-Trauring
b330eb3b6f Merge remote-tracking branch 'origin/master' into 3709-even-more-integration-tests-python-3 2021-05-13 11:27:13 -04:00
Itamar Turner-Trauring
22a0f1d72e Merge remote-tracking branch 'origin/master' into 3707-more-integration-python-3 2021-05-13 11:23:36 -04:00
Itamar Turner-Trauring
330de25061
Merge pull request #1056 from tahoe-lafs/3703.integration-tests-python-3
First integration tests running on Python 3

Fixes ticket:3703
2021-05-13 11:20:54 -04:00
Itamar Turner-Trauring
4c1f65d97a Test for leading slash check. 2021-05-13 10:52:12 -04:00
Itamar Turner-Trauring
c4c053a37d Fix failing tests on Python 3. 2021-05-12 12:02:22 -04:00
Itamar Turner-Trauring
8741c33b35 Needs to be in separate list since it's not checked. 2021-05-12 11:58:02 -04:00
Itamar Turner-Trauring
c4dd8dde27 Flake. 2021-05-12 11:51:47 -04:00
Itamar Turner-Trauring
a0bdc57a5e Flake fix. 2021-05-12 11:10:42 -04:00
Itamar Turner-Trauring
7aa3c9c3ba Use passed-in encoding. 2021-05-12 11:06:26 -04:00
Itamar Turner-Trauring
22f8b9b428 Port to Python 3. 2021-05-12 09:25:52 -04:00
Itamar Turner-Trauring
079041fc1e Port to Python 3. 2021-05-12 09:22:33 -04:00
Itamar Turner-Trauring
e2ce207fdd Don't convert bytes to unicode implicitly. 2021-05-12 09:13:55 -04:00
Itamar Turner-Trauring
fba23ef91c Port to Python 3. 2021-05-11 13:34:35 -04:00
Itamar Turner-Trauring
070691caa2 Make sure it always goes to stderr. 2021-05-11 13:18:03 -04:00
Itamar Turner-Trauring
9b6067dcd1 Make test match reality, and fix corresponding bug. 2021-05-11 13:18:03 -04:00
Itamar Turner-Trauring
b8b00fa2da Port to Python 3. 2021-05-11 11:13:52 -04:00
Itamar Turner-Trauring
9baedc97db Auth token needs to be bytes, apparently. 2021-05-11 11:09:59 -04:00
Itamar Turner-Trauring
03c1376a30 Try to fix the test. 2021-05-10 13:04:44 -04:00
Itamar Turner-Trauring
37bcaf6c88 Port initialization "tests". 2021-05-10 11:51:41 -04:00