You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ocket8888 (via GitHub)" <gi...@apache.org> on 2023/06/26 15:42:42 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request, #7599: API testing services implement concrete services

ocket8888 opened a new pull request, #7599:
URL: https://github.com/apache/trafficcontrol/pull/7599

   What this PR is primarily meant to do is make keeping parity between API services and their mock testing services easier for developers. It does this by, for each API service, ensuring it is `implement`ed by the corresponding mock/testing service. For example, with the API service:
   
   ```typescript
   export class FooService extends APIService {
   	//...
   }
   ```
   
   in `experimental/traffic-portal/src/app/api`, this PR ensures there is a corresponding service in `experimental/traffic-portal/src/app/api/testing` such that:
   
   ```typescript
   import { FooService as ConcreteFooService } from "../foo.service.ts";
   
   export class FooService implements ConcreteFooService {
   	//...
   }
   ```
   
   This means that adding functionality to the "concrete" service that isn't being properly mocked will result in testing compilation errors.
   
   In order to ensure the services are working properly, this PR also adds 100% test coverage to `experimental/traffic-portal/src/app/api/testing` and fills any gaps in testing coverage for `experimental/traffic-portal/src/app/api`.
   
   <hr/>
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal (experimental v2)
   
   ## What is the best way to verify this PR?
   Make sure the provided tests pass.
   
   ## PR submission checklist
   - [x] This PR has tests
   - [x] This PR doesn't need documentation
   - [x] This PR doesn't need a CHANGELOG.md entry
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] codecov[bot] commented on pull request #7599: API testing services implement concrete services

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7599:
URL: https://github.com/apache/trafficcontrol/pull/7599#issuecomment-1607758691

   ## [Codecov](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#7599](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e00087c) into [master](https://app.codecov.io/gh/apache/trafficcontrol/commit/b820264858b6b43d22ecced75bbb1e109fc5b824?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (b820264) will **increase** coverage by `38.75%`.
   > The diff coverage is `99.50%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #7599       +/-   ##
   =============================================
   + Coverage     30.30%   69.06%   +38.75%     
     Complexity       98       98               
   =============================================
     Files           793      314      -479     
     Lines         83427    12318    -71109     
     Branches        898      908       +10     
   =============================================
   - Hits          25283     8507    -16776     
   + Misses        56024     3484    -52540     
   + Partials       2120      327     -1793     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | golib_unit | `?` | |
   | grove_unit | `?` | |
   | t3c_unit | `?` | |
   | traffic_monitor_unit | `?` | |
   | traffic_ops_unit | `?` | |
   | traffic_portal_v2 | `84.02% <99.50%> (+9.74%)` | :arrow_up: |
   | traffic_stats_unit | `?` | |
   | unit_tests | `84.02% <99.50%> (+56.60%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...mental/traffic-portal/src/app/api/testing/index.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3Rlc3RpbmcvaW5kZXgudHM=) | `100.00% <ø> (ø)` | |
   | [...tatuses/status-details/status-details.component.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvY29yZS9zdGF0dXNlcy9zdGF0dXMtZGV0YWlscy9zdGF0dXMtZGV0YWlscy5jb21wb25lbnQudHM=) | `57.14% <0.00%> (ø)` | |
   | [...tal/traffic-portal/src/app/api/base-api.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL2Jhc2UtYXBpLnNlcnZpY2UudHM=) | `100.00% <100.00%> (ø)` | |
   | [...fic-portal/src/app/api/delivery-service.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL2RlbGl2ZXJ5LXNlcnZpY2Uuc2VydmljZS50cw==) | `100.00% <100.00%> (ø)` | |
   | [...al/traffic-portal/src/app/api/misc-apis.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL21pc2MtYXBpcy5zZXJ2aWNlLnRz) | `100.00% <100.00%> (ø)` | |
   | [...ental/traffic-portal/src/app/api/server.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3NlcnZlci5zZXJ2aWNlLnRz) | `100.00% <100.00%> (+16.50%)` | :arrow_up: |
   | [...fic-portal/src/app/api/testing/base-api.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3Rlc3RpbmcvYmFzZS1hcGkuc2VydmljZS50cw==) | `100.00% <100.00%> (ø)` | |
   | [...-portal/src/app/api/testing/cache-group.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3Rlc3RpbmcvY2FjaGUtZ3JvdXAuc2VydmljZS50cw==) | `100.00% <100.00%> (+69.44%)` | :arrow_up: |
   | [.../traffic-portal/src/app/api/testing/cdn.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3Rlc3RpbmcvY2RuLnNlcnZpY2UudHM=) | `100.00% <100.00%> (+81.81%)` | :arrow_up: |
   | [...-portal/src/app/api/testing/change-logs.service.ts](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvYXBpL3Rlc3RpbmcvY2hhbmdlLWxvZ3Muc2VydmljZS50cw==) | `100.00% <100.00%> (+50.00%)` | :arrow_up: |
   | ... and [9 more](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [485 files with indirect coverage changes](https://app.codecov.io/gh/apache/trafficcontrol/pull/7599/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org