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

Increase code coverage on external device service #1623

Conversation

ChristopheRib63
Copy link
Contributor

Description

What's new?

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

@ChristopheRib63 ChristopheRib63 requested a review from a team as a code owner December 1, 2022 15:58
@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

Base: 90.13% // Head: 90.30% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (c9c5b5f) compared to base (4189b0d).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1623      +/-   ##
==========================================
+ Coverage   90.13%   90.30%   +0.16%     
==========================================
  Files         268      268              
  Lines        8842     8842              
==========================================
+ Hits         7970     7985      +15     
+ Misses        872      857      -15     
Impacted Files Coverage Δ
...ub.Portal.Server/Services/ExternalDeviceService.cs 94.73% <0.00%> (+3.94%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@hocinehacherouf hocinehacherouf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristopheRib63 you can increase code coverage on the external service: e.g. on the methods GetEdgeDeviceLogs, GetDeviceTwinWithModule and GetAllEdgeDevice

@kbeaugrand
Copy link
Member

@ChristopheRib63 you can increase code coverage on the external service: e.g. on the methods GetEdgeDeviceLogs, GetDeviceTwinWithModule and GetAllEdgeDevice

@ChristopheRib63 see here the current coverage and what should be tested: https://app.codecov.io/gh/CGI-FR/IoT-Hub-Portal/blob/main/src/AzureIoTHub.Portal.Server/Services/ExternalDeviceService.cs
Your test should also verify the correct execution. Not only launching the function.

@hocinehacherouf hocinehacherouf marked this pull request as draft December 3, 2022 20:41
@hocinehacherouf hocinehacherouf force-pushed the Feature/1536_Increase_code_coverage_on_external_device_service branch 2 times, most recently from f48ed6c to 346f691 Compare December 9, 2022 09:51
{
// Arrange
var service = CreateService();
var mockQuery = this.mockRepository.Create<IQuery>();

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [mockQuery](1) is useless, since its value is never read.
{
// Arrange
var service = CreateService();
var mockQuery = this.mockRepository.Create<IQuery>();

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [mockQuery](1) is useless, since its value is never read.
@kbeaugrand kbeaugrand force-pushed the Feature/1536_Increase_code_coverage_on_external_device_service branch from 477eb65 to 9a252df Compare December 9, 2022 16:35
@ChristopheRib63 ChristopheRib63 marked this pull request as ready for review December 16, 2022 14:04
@hocinehacherouf hocinehacherouf force-pushed the Feature/1536_Increase_code_coverage_on_external_device_service branch from 8fac294 to c9c5b5f Compare December 16, 2022 15:06
@hocinehacherouf hocinehacherouf self-requested a review December 16, 2022 15:09
@hocinehacherouf hocinehacherouf enabled auto-merge (squash) December 16, 2022 15:10
@hocinehacherouf hocinehacherouf merged commit 2f07995 into main Dec 16, 2022
@hocinehacherouf hocinehacherouf deleted the Feature/1536_Increase_code_coverage_on_external_device_service branch December 16, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Increase code coverage on external device service
3 participants