Commit 4a9c083
committed
Merge #1232: Overhaul core Tracker: add tests for
3d89c7f fix: [#1231] lint errors (Jose Celano)
3e02b48 test: [#1231] add more tests for authentication::service mod (Jose Celano)
7d8b394 test: [#1231] add tests for AuthenticationService (Jose Celano)
63e773a refactor: [#1231] remove dead code (Jose Celano)
c3117cf test: [#1231] add more tests for KeysHandler (Jose Celano)
bd4cef6 refactor: [#1231] tests to use database mock in KeysHandler (Jose Celano)
e3ba1e1 test: [#1231] add tests for KeysHandler (Jose Celano)
5db73be refactor: rename methods (Jose Celano)
0d7e30e refactor: [#1231] bittorrent_tracker_core::authentication::key::tests (Jose Celano)
d0c7313 refactor: [#1231] peer_key mod tests (Jose Celano)
5d91a32 test: [#1231] add more tests to peer_key mod (Jose Celano)
0336ca7 refactor: [#1231] exctract mod (Jose Celano)
8709540 refactor: [#1231] improve DatabaseKeyRepository tests (Jose Celano)
e519e7f refactor: [#1231] simplify tests for DatabaseKeyRepository (Jose Celano)
f485a52 refactor: inject only core config in tracker core DB setup (Jose Celano)
7c8d294 test: add tests for DatabaseKeyRepository (Jose Celano)
04ee425 chore: add todo (Jose Celano)
8efda62 test: [#1231] add tests for InMemoryKeyRepository (Jose Celano)
Pull request description:
Overhaul core Tracker: add tests for `authentication` mod.
Coverage before:
```output
Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
packages/tracker-core/src/authentication/handler.rs 85 17 80.00% 28 1 96.43% 203 35 82.76% 0 0 -
packages/tracker-core/src/authentication/key/mod.rs 55 7 87.27% 18 3 83.33% 124 12 90.32% 0 0 -
packages/tracker-core/src/authentication/key/repository/in_memory.rs 23 5 78.26% 10 2 80.00% 25 5 80.00% 0 0 -
packages/tracker-core/src/authentication/key/repository/persisted.rs 15 3 80.00% 4 0 100.00% 17 0 100.00% 0 0 -
packages/tracker-core/src/authentication/mod.rs 67 0 100.00% 19 0 100.00% 201 0 100.00% 0 0 -
packages/tracker-core/src/authentication/service.rs 22 2 90.91%
```
Coverage after:
```output
Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
packages/tracker-core/src/authentication/handler.rs 158 9 94.30% 52 0 100.00% 583 0 100.00% 0 0 -
packages/tracker-core/src/authentication/key/mod.rs 35 3 91.43% 11 0 100.00% 96 0 100.00% 0 0 -
packages/tracker-core/src/authentication/key/peer_key.rs 39 0 100.00% 17 0 100.00% 102 0 100.00% 0 0 -
packages/tracker-core/src/authentication/key/repository/in_memory.rs 51 0 100.00% 20 0 100.00% 169 0 100.00% 0 0 -
packages/tracker-core/src/authentication/key/repository/persisted.rs 24 2 91.67% 8 0 100.00% 77 0 100.00% 0 0 -
packages/tracker-core/src/authentication/mod.rs 67 0 100.00% 19 0 100.00% 219 0 100.00% 0 0 -
packages/tracker-core/src/authentication/service.rs 52 0 100.00% 20 0 100.00% 268 0 100.00% 0 0 -
```
ACKs for top commit:
josecelano:
ACK 3d89c7f
Tree-SHA512: 6107da6ab65266f4efa50b93d6c3ed38d5c5289d4d4a449b15a8aa3021d0219bfb1dc78e833675a81a2803091fa7f65db354bd6a67f5bcfcbefb55995e6d94a7authentication modFile tree
24 files changed
+1098
-308
lines changed- packages
- test-helpers/src
- tracker-core
- src
- authentication
- key
- repository
- databases
- whitelist
- src
- bootstrap
- servers
- apis/v1/context/auth_key
- http/v1
- handlers
- services
- udp
- tests/servers
- api/v1/contract/context
- http/v1
24 files changed
+1098
-308
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
0 commit comments