Skip to content

Commit 8322965

Browse files
authored
[IoT]IoT Hub SDK version update to 4.2.0 and fixed Get-AzIoTHub to work with DigiCert hubs (#20938)
* IoT Hub SDK version update to 4.2.0 and fixed Get-AzIoTHub to work with DigiCert hubs * Remove CertificateBodyDescription creation * Reconfigure EventHubConsumerGroupName property * update dps session records * Fix DPS tests
1 parent fcc0121 commit 8322965

File tree

22 files changed

+7061
-8078
lines changed

22 files changed

+7061
-8078
lines changed

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/DeviceProvisioningServices.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Devices" Version="1.22.0" />
1515
<PackageReference Include="Microsoft.Azure.Management.DeviceProvisioningServices" Version="0.10.0-preview" />
16-
<PackageReference Include="Microsoft.Azure.Management.IotHub" Version="3.0.1" />
16+
<PackageReference Include="Microsoft.Azure.Management.IotHub" Version="4.2.0" />
1717
</ItemGroup>
1818

1919
</Project>

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/ScenarioTests/IotDpsAccessPolicyTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Test-AzureIotDpsAccessPolicyLifeCycle
3030

3131
# Constant variable
3232
$AccessPolicyDefaultKeyName = "provisioningserviceowner"
33-
$AccessPolicyDefaultRights = "ServiceConfig, DeviceConnect, EnrollmentWrite"
33+
$AccessPolicyDefaultRights = "ServiceConfig, EnrollmentWrite, DeviceConnect"
3434
$NewAccessPolicyKeyName = "Access1"
3535
$NewAccessPolicyRights = "ServiceConfig"
3636

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/ScenarioTests/IotDpsEnrollmentGroupTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function Test-AzIotDpsEnrollmentGroupLifeCycle
5252
Assert-True { $iotHub.Name -eq $IotHubName }
5353

5454
# Add a key to IoT Hub
55-
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights ServiceConnect
55+
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights RegistryWrite,ServiceConnect
5656
Assert-True { $hubKeys.Count -gt 1 }
5757

5858
# Get key information from IoT Hub

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/ScenarioTests/IotDpsEnrollmentTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function Test-AzIotDpsEnrollmentLifeCycle
5555
Assert-True { $iotHub.Name -eq $IotHubName }
5656

5757
# Add a key to IoT Hub
58-
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights ServiceConnect
58+
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights RegistryWrite,ServiceConnect
5959
Assert-True { $hubKeys.Count -gt 1 }
6060

6161
# Get key information from IoT Hub

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/ScenarioTests/IotDpsLinkedHubTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Test-AzureIotDpsLinkedHubLifeCycle
4848
Assert-True { $iotHub.Name -eq $IotHubName }
4949

5050
# Add a key to IoT Hub
51-
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights ServiceConnect
51+
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights ServiceConnect,RegistryWrite
5252
Assert-True { $hubKeys.Count -gt 1 }
5353

5454
# Get key information from IoT Hub

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/ScenarioTests/IotDpsRegistrationTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function Test-AzIotDpsRegistrationLifeCycle
5050
Assert-True { $iotHub.Name -eq $IotHubName }
5151

5252
# Add a key to IoT Hub
53-
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights ServiceConnect
53+
$hubKeys = Add-AzIoTHubKey -Name $IotHubName -ResourceGroupName $ResourceGroupName -KeyName $hubKeyName -Rights RegistryWrite,ServiceConnect
5454
Assert-True { $hubKeys.Count -gt 1 }
5555

5656
# Get key information from IoT Hub

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/SessionRecords/Commands.DeviceProvisioningServices.Test.IotDpsAccessPolicyTests/IotDpsAccessPolicyLifeCycle.json

Lines changed: 378 additions & 489 deletions
Large diffs are not rendered by default.

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/SessionRecords/Commands.DeviceProvisioningServices.Test.IotDpsEnrollmentGroupTests/IotDpsEnrollmentGroupLifeCycle.json

Lines changed: 1071 additions & 1245 deletions
Large diffs are not rendered by default.

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/SessionRecords/Commands.DeviceProvisioningServices.Test.IotDpsEnrollmentTests/IotDpsEnrollmentLifeCycle.json

Lines changed: 1139 additions & 1313 deletions
Large diffs are not rendered by default.

src/DeviceProvisioningServices/DeviceProvisioningServices.Test/SessionRecords/Commands.DeviceProvisioningServices.Test.IotDpsLinkedHubTests/IotDpsLinkedHubLifeCycle.json

Lines changed: 593 additions & 875 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)