Skip to content

Commit

Permalink
Upgrade All .net versions (#1949)
Browse files Browse the repository at this point in the history
* Upgrade versions

* Fix tests
  • Loading branch information
Mandur authored Oct 31, 2022
1 parent 8639ddc commit 70a0a56
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
17 changes: 9 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,45 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<AzureStorageBlobVersion>12.14.1</AzureStorageBlobVersion>
<DockerDotNetX509Version>3.125.12</DockerDotNetX509Version>
<MicrosoftAzureDevicesVersion>1.38.1</MicrosoftAzureDevicesVersion>
<MicrosoftAzureDevicesClientVersion>1.41.2</MicrosoftAzureDevicesClientVersion>
<MicrosoftExtensionsCachingMemoryVersion>6.0.1</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftAzureFunctionsExtensionsVersion>1.1.0</MicrosoftAzureFunctionsExtensionsVersion>
<MicrosoftExtensionsDependencyInjectionVersion>6.0.0</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyInjectionVersion>6.0.1</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
<MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion>
<MicrosoftNETSdkFunctionsVersion>4.1.3</MicrosoftNETSdkFunctionsVersion>
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<PortableBouncyCastleVersion>1.9.0</PortableBouncyCastleVersion>
<SystemDynamicRuntimeVersion>4.3.0</SystemDynamicRuntimeVersion>
<StackExchangeRedisVersion>2.6.66</StackExchangeRedisVersion>
<StackExchangeRedisVersion>2.6.70</StackExchangeRedisVersion>
<MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>
<ApplicationInsightsVersion>2.21.0</ApplicationInsightsVersion>
<PrometheusNetVersion>6.0.0</PrometheusNetVersion>
<AzureIdentityVersion>1.6.1</AzureIdentityVersion>
<PrometheusNetVersion>7.0.0</PrometheusNetVersion>
<AzureIdentityVersion>1.7.0</AzureIdentityVersion>
<MicrosoftAspNetCoreHttpAbstractionsVersion>2.2.0</MicrosoftAspNetCoreHttpAbstractionsVersion>
</PropertyGroup>
<PropertyGroup> <!-- this group is meant for packages required from test projects -->
<DockerDotnetVersion>3.125.5</DockerDotnetVersion>
<DockerDotnetVersion>3.125.12</DockerDotnetVersion>
<MicrosoftNETTestSdkVersion>17.3.2</MicrosoftNETTestSdkVersion>
<MoqVersion>4.18.2</MoqVersion>
<XUnitVersion>2.4.2</XUnitVersion>
<XunitCombinatorialVersion>1.4.1</XunitCombinatorialVersion>
<XunitCombinatorialVersion>1.5.25</XunitCombinatorialVersion>
<MicrosoftExtensionsConfigurationVersion>6.0.1</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationBinderVersion>6.0.0</MicrosoftExtensionsConfigurationBinderVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.1</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>6.0.0</MicrosoftExtensionsConfigurationJsonVersion>
<SystemIOPortsVersion>6.0.0</SystemIOPortsVersion>
<XUnitRunnerVisualStudio>2.4.5</XUnitRunnerVisualStudio>
<CoverletMSBuild>3.1.2</CoverletMSBuild>
<CoverletMSBuild>3.2.0</CoverletMSBuild>
<MicrosoftExtensionsLogging>6.0.0</MicrosoftExtensionsLogging>
<MicrosoftExtensionsLoggingConfiguration>6.0.0</MicrosoftExtensionsLoggingConfiguration>
<BogusVersion>34.0.2</BogusVersion>
<NullablePkg>1.3.0</NullablePkg>
<MicrosoftAspNetCoreMvcTestingVersion>6.0.10</MicrosoftAspNetCoreMvcTestingVersion>
<AzureMessagingEventHubsVersion>5.7.2</AzureMessagingEventHubsVersion>
<AzureMessagingEventHubsVersion>5.7.3</AzureMessagingEventHubsVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions LoRaEngine/LoraKeysManagerFacade/LoraKeysManagerFacade.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(TargetFramework)</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.1" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.5.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="$(AzureStorageBlobVersion)" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.6.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="$(MicrosoftAzureFunctionsExtensionsVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="$(ApplicationInsightsVersion)" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.9" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.10" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="prometheus-net.AspNetCore" Version="$(PrometheusNetVersion)" />
<PackageReference Include="StackExchange.Redis" Version="$(StackExchangeRedisVersion)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task RunFetchConcentratorFirmware_Succeeds()
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);

var twin = new Twin();
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
'package': '1.0.1',
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
'fwKeyChecksum': 123456,
Expand All @@ -81,7 +81,7 @@ public async Task RunFetchConcentratorFirmware_Succeeds()
var blobBytes = Encoding.UTF8.GetBytes(BlobContent);
using var blobContentStream = new MemoryStream(blobBytes);
using var streamingResult = BlobsModelFactory.BlobDownloadStreamingResult(blobContentStream);
this.blobClient.Setup(m => m.DownloadStreamingAsync(default, null, false, null, It.IsAny<CancellationToken>()))
this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<BlobDownloadOptions>(), It.IsAny<CancellationToken>()))
.Returns(Task.FromResult(Response.FromValue(streamingResult, new Mock<Response>().Object)));

this.blobClient.Setup(m => m.GetPropertiesAsync(null, It.IsAny<CancellationToken>()))
Expand Down Expand Up @@ -109,7 +109,7 @@ public async Task RunFetchConcentratorFirmware_Returns_NotFound_ForMissingTwin()
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);

var twin = new Twin();
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
'package': '1.0.1',
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
'fwKeyChecksum': 123456,
Expand Down Expand Up @@ -149,7 +149,7 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_ForTw
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);

var twin = new Twin();
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'a': 'b'}"));
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'a': 'b'}"));
this.registryManager.Setup(m => m.GetTwinAsync(It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(Task.FromResult<IDeviceTwin>(new IoTHubDeviceTwin(twin)));

Expand All @@ -171,7 +171,7 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_ForTw
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);

var twin = new Twin();
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
'package': '1.0.1',
'fwKeyChecksum': 123456,
'fwSignature': '123'
Expand All @@ -197,7 +197,7 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_WhenD
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);

var twin = new Twin();
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
'package': '1.0.1',
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
'fwKeyChecksum': 123456,
Expand All @@ -206,10 +206,7 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_WhenD
this.registryManager.Setup(m => m.GetTwinAsync(It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(Task.FromResult<IDeviceTwin>(new IoTHubDeviceTwin(twin)));

this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<HttpRange>(),
It.IsAny<BlobRequestConditions>(),
It.IsAny<bool>(),
It.IsAny<IProgress<long>>(),
this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<BlobDownloadOptions>(),
It.IsAny<CancellationToken>()))
.ThrowsAsync(new RequestFailedException("download failed"));

Expand Down

0 comments on commit 70a0a56

Please sign in to comment.