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

Rework edge model service to use database #1273

Merged
merged 10 commits into from
Sep 23, 2022

Conversation

audserraCGI
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

@audserraCGI audserraCGI force-pushed the 1227_edge_models_listing_should_use_database branch from c5dca0b to 852cd4d Compare September 23, 2022 13:12
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 88.22% // Head: 88.29% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (98925e9) compared to base (08a9b4b).
Patch coverage: 96.64% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1273      +/-   ##
==========================================
+ Coverage   88.22%   88.29%   +0.07%     
==========================================
  Files         222      226       +4     
  Lines        6826     6827       +1     
==========================================
+ Hits         6022     6028       +6     
+ Misses        804      799       -5     
Impacted Files Coverage Δ
...Pages/EdgeModels/EdgeModule/ModuleDialogTab3.razor 100.00% <ø> (ø)
.../Client/Pages/EdgeModels/EdgeModelDetailPage.razor 81.45% <77.77%> (ø)
...eIoTHub.Portal/Server/Services/EdgeModelService.cs 98.65% <99.05%> (+0.96%) ⬆️
...e/Repositories/EdgeDeviceModelCommandRepository.cs 100.00% <100.00%> (ø)
...tructure/Repositories/EdgeDeviceModelRepository.cs 100.00% <100.00%> (ø)
...al/Server/Mappers/EdgeDeviceModelCommandProfile.cs 100.00% <100.00%> (ø)
...ub.Portal/Server/Mappers/EdgeDeviceModelProfile.cs 100.00% <100.00%> (ø)
....Portal/Shared/Models/v1.0/IoTEdgeModuleCommand.cs 100.00% <100.00%> (ø)
...ubPortal.Domain/Entities/EdgeDeviceModelCommand.cs 100.00% <100.00%> (+100.00%) ⬆️
...c/AzureIoTHub.Portal/Server/Entities/EntityBase.cs 50.00% <0.00%> (-25.00%) ⬇️
... and 4 more

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.

_ = this.mockTableClientFactory.Setup(c => c.GetEdgeDeviceTemplates())
.Returns(this.mockEdgeDeviceTemplatesTableClient.Object);
_ = this.mockEdgeDeviceModelRepository.Setup(x => x.GetByIdAsync(It.IsAny<string>()))
.ReturnsAsync((EdgeDeviceModel)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [EdgeDeviceModel](2) - the conversion can be done implicitly.

var mockModuleCommandResponse = this.mockRepository.Create<Response>();
_ = this.mockEdgeDeviceModelRepository.Setup(x => x.GetByIdAsync(It.IsAny<string>()))
.ReturnsAsync((EdgeDeviceModel)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [EdgeDeviceModel](2) - the conversion can be done implicitly.
_ = this.mockTableClientFactory.Setup(c => c.GetEdgeDeviceTemplates())
.Returns(this.mockEdgeDeviceTemplatesTableClient.Object);
_ = this.mockEdgeDeviceModelRepository.Setup(x => x.GetByIdAsync(It.IsAny<string>()))
.ReturnsAsync((EdgeDeviceModel)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [EdgeDeviceModel](2) - the conversion can be done implicitly.
ModelId = null
};
_ = this.mockEdgeDeviceModelRepository.Setup(x => x.GetByIdAsync(It.IsAny<string>()))
.ReturnsAsync((EdgeDeviceModel)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [EdgeDeviceModel](2) - the conversion can be done implicitly.
@hocinehacherouf hocinehacherouf marked this pull request as ready for review September 23, 2022 17:32
@hocinehacherouf hocinehacherouf requested a review from a team as a code owner September 23, 2022 17:32
@kbeaugrand kbeaugrand merged commit abb5669 into main Sep 23, 2022
@kbeaugrand kbeaugrand deleted the 1227_edge_models_listing_should_use_database branch September 23, 2022 19:01
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.

Edge models listing should use database
3 participants