Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Test coverage for webhooks SSE route #745

Merged
merged 12 commits into from
Apr 8, 2024
Merged

Conversation

ff137
Copy link
Collaborator

@ff137 ff137 commented Apr 8, 2024

No description provided.

webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
Copy link

github-actions bot commented Apr 8, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
app
   main.py802668%81–84, 108, 110, 112, 116, 123, 149–154, 161–188
app/dependencies
   acapy_clients.py24196%52
   auth.py561868%31, 37–38, 41, 52–55, 62–63, 68, 74–79, 83–86, 90–91
   role.py34197%56
app/models
   issuer.py48296%35, 44
   jsonld.py35586%21, 45–50
   oob.py24196%26
   tenants.py761186%75, 78, 89, 94, 106, 109, 128–138
   verifier.py651282%34, 42, 50–64, 101, 109–113
app/routes
   connections.py603935%32–48, 64–76, 113–138, 159–173, 188–199
   definitions.py1889251%76–137, 170–171, 238–254, 269–275, 296–305, 328–329, 346–348, 383–437, 464–465, 509–589, 597–616
   issuer.py1733878%92, 128, 167–169, 198, 234–236, 244, 261, 360–370, 401–412, 445–476, 517, 530, 562
   jsonld.py604722%23–93, 104–137
   messaging.py241154%32–41, 61–71
   oob.py462839%27–68, 79–92, 116–127
   verifier.py1463278%64–66, 71, 109–111, 116, 158, 166–168, 173, 207–211, 220–222, 272–274, 280, 313–315, 320, 350–352, 386–388
   webhooks.py16475%32–36, 57–61
   websocket_endpoint.py23865%24–25, 37–42, 54–57, 70–76
app/routes/wallet
   credentials.py775232%32–45, 54–66, 75–86, 95–109, 120–136, 148–162, 171–183, 192–203
   dids.py762271%28–37, 56–57, 79–80, 92–99, 107–115
   jws.py422736%35–60, 76–99
   sd_jws.py422736%36–61, 78–101
app/services
   acapy_ledger.py611280%110–111, 124–140, 196–197
   acapy_wallet.py39490%60–61, 97–98
   revocation_registry.py1301291%309–313, 341, 351–353, 383–387, 412–417
   webhooks.py271833%17–25, 29–39
   websocket.py514120%19–22, 29–36, 47–91
app/services/event_handling
   websocket_manager.py732664%64–68, 87–90, 97–108, 115–125, 139
app/services/issuer
   acapy_issuer_v1.py921485%36, 76–110, 213–214
   acapy_issuer_v2.py1062279%60–63, 87–127, 173, 235–236, 263
app/services/onboarding
   tenants.py584424%30–97, 107–137
   verifier.py37392%67, 83–87
app/services/onboarding/util
   register_issuer_did.py86397%100–102
   set_endorser_metadata.py693746%28–30, 50–52, 76–78, 109–128, 140–149, 161–172, 185–197
app/services/trust_registry
   actors.py107992%94–99, 109, 208–209, 211–216, 281–284
   schemas.py49492%56–61, 91–96
app/services/trust_registry/util
   actor.py31294%26–27
   issuer.py23483%39–40, 48–49
app/services/verifier
   acapy_verifier_v1.py1296252%39, 61–62, 70, 80, 102–103, 111, 119, 144–145, 153, 166–179, 190–191, 206–228, 234–256, 260–276, 282–302
   acapy_verifier_v2.py1366751%43–48, 68–69, 77, 90–95, 116–117, 125, 138–143, 160–161, 169, 182–194, 205–206, 221–242, 248–269, 273–289, 295–315
app/tests/e2e
   conftest.py23578%43–51
   test_jsonld.py591673%133–168
   test_tenants.py3341596%167, 211–212, 240, 665, 699–700, 709–710, 719–720, 732–733, 742–743
   test_wallet_dids.py671085%92–107
app/tests/e2e/issuer
   test_save_exchange_record.py59198%141
app/tests/e2e/verifier
   test_verifier.py402199%1091
app/tests/exception_handling
   test_handle_model_with_validation.py23196%22
app/tests/services
   test_revocation_registry.py135299%73, 106
app/tests/services/issuer
   test_issuer.py161299%316–319
app/tests/util
   credentials.py56198%153
   ecosystem_connections.py1332780%311–330, 347–367, 375–414
   ledger.py491080%34, 42, 54, 62–66, 76, 82
   member_acapy_clients.py36489%47–50, 73–74
   sse_listener.py41880%50–55, 79–84
   trust_registry.py42393%27, 30–31
   webhooks.py45491%19, 74–77, 100
app/util
   acapy_issuer_utils.py18194%22
   acapy_verifier_utils.py137596%108–111, 189–192, 269
   credentials.py11464%11, 15–18
   retry_method.py362142%15–36, 76–77, 91–103
   tenants.py441761%24–29, 44–45, 52–59, 90–91, 97, 123
endorser
   main.py33391%59–62
endorser/services
   endorsement_processor.py1371490%90, 152–162, 195–199, 211, 223, 241–242, 251–255
endorser/services/dependency_injection
   container.py14193%54
endorser/util
   endorsement.py58690%57–58, 62–63, 94–99
   transaction_record.py54394%52–53, 90
   trust_registry.py34488%51–52, 63–67
trustregistry
   crud.py17615214%15–30, 34–46, 50–62, 66–78, 82–141, 145–161, 165–194, 200–214, 218–228, 232–252, 256–283, 287–302
   db.py29969%11–15, 19–23
   list_type.py11464%11–14, 17
   main.py411563%23–32, 54–59, 64
trustregistry/registry
   registry_actors.py825829%19–22, 27–38, 45–65, 72–82, 89–99, 106–116, 121–127
   registry_schemas.py654038%24–27, 34–51, 58–92, 97–108, 113–119
webhooks/models
   conversions.py63690%70, 83, 89, 110, 145, 163
webhooks/services
   acapy_events_processor.py1751591%95, 158–168, 216–220, 248, 276–277, 305–309, 321–325
   sse_manager.py2353685%153, 155–168, 206–216, 245–246, 259–273, 328–332, 338–341, 343–346, 371–372, 415–417, 451, 462–463
   webhooks_redis_service.py1222084%60–63, 66, 123, 130–131, 233–234, 296, 302–303, 317–331, 350
webhooks/services/dependency_injection
   container.py18194%61
webhooks/tests
   test_sse_manager.py180398%212–213, 219
webhooks/tests/e2e
   test_sse.py81495%121, 147–150
webhooks/web
   main.py42393%77–80
webhooks/web/routers
   sse.py17511037%50–54, 95–122, 166–193, 235–268, 313–343, 390–426
   webhooks.py301453%27–36, 50–63
TOTAL11399156786% 

Tests Skipped Failures Errors Time
541 8 💤 0 ❌ 0 🔥 12m 8s ⏱️

webhooks/web/routers/sse.py Fixed Show fixed Hide fixed
webhooks/web/routers/sse.py Fixed Show fixed Hide fixed
webhooks/web/routers/sse.py Dismissed Show dismissed Hide dismissed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/tests/routes/test_sse.py Fixed Show fixed Hide fixed
webhooks/web/routers/sse.py Fixed Show fixed Hide fixed
Copy link

github-actions bot commented Apr 8, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
app
   main.py802668%81–84, 108, 110, 112, 116, 123, 149–154, 161–188
app/dependencies
   acapy_clients.py24196%52
   auth.py561868%31, 37–38, 41, 52–55, 62–63, 68, 74–79, 83–86, 90–91
   role.py34197%56
app/models
   issuer.py48296%35, 44
   jsonld.py35586%21, 45–50
   oob.py24196%26
   tenants.py761186%75, 78, 89, 94, 106, 109, 128–138
   verifier.py651282%34, 42, 50–64, 101, 109–113
app/routes
   connections.py603935%32–48, 64–76, 113–138, 159–173, 188–199
   definitions.py1889251%76–137, 170–171, 238–254, 269–275, 296–305, 328–329, 346–348, 383–437, 464–465, 509–589, 597–616
   issuer.py1733878%92, 128, 167–169, 198, 234–236, 244, 261, 360–370, 401–412, 445–476, 517, 530, 562
   jsonld.py604722%23–93, 104–137
   messaging.py241154%32–41, 61–71
   oob.py462839%27–68, 79–92, 116–127
   verifier.py1463278%64–66, 71, 109–111, 116, 158, 166–168, 173, 207–211, 220–222, 272–274, 280, 313–315, 320, 350–352, 386–388
   webhooks.py16475%32–36, 57–61
   websocket_endpoint.py23865%24–25, 37–42, 54–57, 70–76
app/routes/wallet
   credentials.py775232%32–45, 54–66, 75–86, 95–109, 120–136, 148–162, 171–183, 192–203
   dids.py762271%28–37, 56–57, 79–80, 92–99, 107–115
   jws.py422736%35–60, 76–99
   sd_jws.py422736%36–61, 78–101
app/services
   acapy_ledger.py611280%110–111, 124–140, 196–197
   acapy_wallet.py39490%60–61, 97–98
   revocation_registry.py1301291%309–313, 341, 351–353, 383–387, 412–417
   webhooks.py271833%17–25, 29–39
   websocket.py514120%19–22, 29–36, 47–91
app/services/event_handling
   websocket_manager.py732664%64–68, 87–90, 97–108, 115–125, 139
app/services/issuer
   acapy_issuer_v1.py921485%36, 76–110, 213–214
   acapy_issuer_v2.py1062279%60–63, 87–127, 173, 235–236, 263
app/services/onboarding
   tenants.py584424%30–97, 107–137
   verifier.py37392%67, 83–87
app/services/onboarding/util
   register_issuer_did.py86397%100–102
   set_endorser_metadata.py693746%28–30, 50–52, 76–78, 109–128, 140–149, 161–172, 185–197
app/services/trust_registry
   actors.py107992%94–99, 109, 208–209, 211–216, 281–284
   schemas.py49492%56–61, 91–96
app/services/trust_registry/util
   actor.py31294%26–27
   issuer.py23483%39–40, 48–49
app/services/verifier
   acapy_verifier_v1.py1296252%39, 61–62, 70, 80, 102–103, 111, 119, 144–145, 153, 166–179, 190–191, 206–228, 234–256, 260–276, 282–302
   acapy_verifier_v2.py1366751%43–48, 68–69, 77, 90–95, 116–117, 125, 138–143, 160–161, 169, 182–194, 205–206, 221–242, 248–269, 273–289, 295–315
app/tests/e2e
   conftest.py23578%43–51
   test_jsonld.py591673%133–168
   test_tenants.py3341596%167, 211–212, 240, 665, 699–700, 709–710, 719–720, 732–733, 742–743
   test_wallet_dids.py671085%92–107
app/tests/e2e/issuer
   test_save_exchange_record.py59198%141
app/tests/e2e/verifier
   test_verifier.py402199%1091
app/tests/exception_handling
   test_handle_model_with_validation.py23196%22
app/tests/services
   test_revocation_registry.py135299%73, 106
app/tests/services/issuer
   test_issuer.py161299%316–319
app/tests/util
   credentials.py56198%153
   ecosystem_connections.py1332780%311–330, 347–367, 375–414
   ledger.py491080%34, 42, 54, 62–66, 76, 82
   member_acapy_clients.py36489%47–50, 73–74
   sse_listener.py41880%50–55, 79–84
   trust_registry.py42393%27, 30–31
   webhooks.py45491%19, 74–77, 100
app/util
   acapy_issuer_utils.py18194%22
   acapy_verifier_utils.py137596%108–111, 189–192, 269
   credentials.py11464%11, 15–18
   retry_method.py362142%15–36, 76–77, 91–103
   tenants.py441761%24–29, 44–45, 52–59, 90–91, 97, 123
endorser
   main.py33391%59–62
endorser/services
   endorsement_processor.py1371490%90, 152–162, 195–199, 211, 223, 241–242, 251–255
endorser/services/dependency_injection
   container.py14193%54
endorser/util
   endorsement.py58690%57–58, 62–63, 94–99
   transaction_record.py54394%52–53, 90
   trust_registry.py34488%51–52, 63–67
trustregistry
   crud.py17615214%15–30, 34–46, 50–62, 66–78, 82–141, 145–161, 165–194, 200–214, 218–228, 232–252, 256–283, 287–302
   db.py29969%11–15, 19–23
   list_type.py11464%11–14, 17
   main.py411563%23–32, 54–59, 64
trustregistry/registry
   registry_actors.py825829%19–22, 27–38, 45–65, 72–82, 89–99, 106–116, 121–127
   registry_schemas.py654038%24–27, 34–51, 58–92, 97–108, 113–119
webhooks/models
   conversions.py63690%70, 83, 89, 110, 145, 163
webhooks/services
   acapy_events_processor.py1751591%95, 158–168, 216–220, 248, 276–277, 305–309, 321–325
   sse_manager.py2353685%153, 155–168, 206–216, 245–246, 259–273, 328–332, 338–341, 343–346, 371–372, 415–417, 451, 462–463
   webhooks_redis_service.py1222084%60–63, 66, 123, 130–131, 233–234, 296, 302–303, 317–331, 350
webhooks/services/dependency_injection
   container.py18194%61
webhooks/tests
   test_sse_manager.py180398%212–213, 219
webhooks/tests/e2e
   test_sse.py81495%121, 147–150
webhooks/web
   main.py42393%77–80
webhooks/web/routers
   sse.py105991%138–140, 166–172
   webhooks.py301453%27–36, 50–63
TOTAL11420146687% 

Tests Skipped Failures Errors Time
563 8 💤 0 ❌ 0 🔥 11m 50s ⏱️

@ff137 ff137 force-pushed the tests/webhooks-sse branch from b778f2d to dd75e08 Compare April 8, 2024 14:58
@ff137 ff137 enabled auto-merge (squash) April 8, 2024 14:58
Copy link

sonarqubecloud bot commented Apr 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ff137 ff137 merged commit ca0ddbe into development Apr 8, 2024
43 checks passed
@ff137 ff137 deleted the tests/webhooks-sse branch April 8, 2024 15:04
Copy link

github-actions bot commented Apr 8, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
app
   main.py802668%81–84, 108, 110, 112, 116, 123, 149–154, 161–188
app/dependencies
   acapy_clients.py24196%52
   auth.py561868%31, 37–38, 41, 52–55, 62–63, 68, 74–79, 83–86, 90–91
   role.py34197%56
app/models
   issuer.py48296%35, 44
   jsonld.py35586%21, 45–50
   oob.py24196%26
   tenants.py761186%75, 78, 89, 94, 106, 109, 128–138
   verifier.py651282%34, 42, 50–64, 101, 109–113
app/routes
   connections.py603935%32–48, 64–76, 113–138, 159–173, 188–199
   definitions.py1889251%76–137, 170–171, 238–254, 269–275, 296–305, 328–329, 346–348, 391–445, 472–473, 517–597, 605–624
   issuer.py1733878%92, 128, 167–169, 198, 234–236, 244, 261, 360–370, 401–412, 445–476, 517, 530, 562
   jsonld.py604722%23–93, 104–137
   messaging.py241154%32–41, 61–71
   oob.py462839%27–68, 79–92, 116–127
   verifier.py1463278%64–66, 71, 109–111, 116, 158, 166–168, 173, 207–211, 220–222, 272–274, 280, 313–315, 320, 350–352, 386–388
   webhooks.py16475%32–36, 57–61
   websocket_endpoint.py23865%24–25, 37–42, 54–57, 70–76
app/routes/wallet
   credentials.py775232%32–45, 54–66, 75–86, 95–109, 120–136, 148–162, 171–183, 192–203
   dids.py762271%28–37, 56–57, 79–80, 92–99, 107–115
   jws.py422736%35–60, 76–99
   sd_jws.py422736%36–61, 78–101
app/services
   acapy_ledger.py611280%110–111, 124–140, 196–197
   acapy_wallet.py39490%60–61, 97–98
   revocation_registry.py1301291%309–313, 341, 351–353, 383–387, 412–417
   webhooks.py271833%17–25, 29–39
   websocket.py514120%19–22, 29–36, 47–91
app/services/event_handling
   websocket_manager.py732664%64–68, 87–90, 97–108, 115–125, 139
app/services/issuer
   acapy_issuer_v1.py921485%36, 76–110, 213–214
   acapy_issuer_v2.py1062279%60–63, 87–127, 173, 235–236, 263
app/services/onboarding
   tenants.py584424%30–97, 107–137
   verifier.py37392%67, 83–87
app/services/onboarding/util
   register_issuer_did.py86397%100–102
   set_endorser_metadata.py693746%28–30, 50–52, 76–78, 109–128, 140–149, 161–172, 185–197
app/services/trust_registry
   actors.py107992%94–99, 109, 208–209, 211–216, 281–284
   schemas.py49492%56–61, 91–96
app/services/trust_registry/util
   actor.py31294%26–27
   issuer.py23483%39–40, 48–49
app/services/verifier
   acapy_verifier_v1.py1296252%39, 61–62, 70, 80, 102–103, 111, 119, 144–145, 153, 166–179, 190–191, 206–228, 234–256, 260–276, 282–302
   acapy_verifier_v2.py1366751%43–48, 68–69, 77, 90–95, 116–117, 125, 138–143, 160–161, 169, 182–194, 205–206, 221–242, 248–269, 273–289, 295–315
app/tests/e2e
   conftest.py23578%43–51
   test_jsonld.py591673%133–168
   test_tenants.py3341596%167, 211–212, 240, 665, 699–700, 709–710, 719–720, 732–733, 742–743
   test_wallet_dids.py671085%92–107
app/tests/e2e/issuer
   test_save_exchange_record.py59198%141
app/tests/e2e/verifier
   test_verifier.py402199%1091
app/tests/exception_handling
   test_handle_model_with_validation.py23196%22
app/tests/services
   test_revocation_registry.py135299%73, 106
app/tests/services/issuer
   test_issuer.py161299%316–319
app/tests/util
   credentials.py56198%153
   ecosystem_connections.py1332780%311–330, 347–367, 375–414
   ledger.py491080%34, 42, 54, 62–66, 76, 82
   member_acapy_clients.py36489%47–50, 73–74
   sse_listener.py41880%50–55, 79–84
   trust_registry.py42393%27, 30–31
   webhooks.py45491%19, 74–77, 100
app/util
   acapy_issuer_utils.py18194%22
   acapy_verifier_utils.py137596%108–111, 189–192, 269
   credentials.py11464%11, 15–18
   retry_method.py361558%20–35, 76–77, 91–103
   tenants.py441761%24–29, 44–45, 52–59, 90–91, 97, 123
endorser
   main.py33391%59–62
endorser/services
   endorsement_processor.py1371490%90, 152–162, 195–199, 211, 223, 241–242, 251–255
endorser/services/dependency_injection
   container.py14193%54
endorser/util
   endorsement.py58690%57–58, 62–63, 94–99
   transaction_record.py54394%52–53, 90
   trust_registry.py34488%51–52, 63–67
trustregistry
   crud.py17615214%15–30, 34–46, 50–62, 66–78, 82–141, 145–161, 165–194, 200–214, 218–228, 232–252, 256–283, 287–302
   db.py29969%11–15, 19–23
   list_type.py11464%11–14, 17
   main.py411563%23–32, 54–59, 64
trustregistry/registry
   registry_actors.py825829%19–22, 27–38, 45–65, 72–82, 89–99, 106–116, 121–127
   registry_schemas.py654038%24–27, 34–51, 58–92, 97–108, 113–119
webhooks/models
   conversions.py63690%70, 83, 89, 110, 145, 163
webhooks/services
   acapy_events_processor.py1751591%95, 158–168, 216–220, 248, 276–277, 305–309, 321–325
   sse_manager.py2353685%153, 155–168, 206–216, 245–246, 259–273, 328–332, 338–341, 343–346, 371–372, 415–417, 451, 462–463
   webhooks_redis_service.py1222084%60–63, 66, 123, 130–131, 233–234, 296, 302–303, 317–331, 350
webhooks/services/dependency_injection
   container.py18194%61
webhooks/tests
   test_sse_manager.py180398%212–213, 219
webhooks/tests/e2e
   test_sse.py81495%121, 147–150
webhooks/web
   main.py42393%77–80
webhooks/web/routers
   sse.py105991%138–140, 166–172
   webhooks.py301453%27–36, 50–63
TOTAL11420146087% 

Tests Skipped Failures Errors Time
563 8 💤 0 ❌ 0 🔥 12m 24s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant