Skip to content

Commit eba8327

Browse files
author
Ravi Teja
committed
updating resource
1 parent c43172c commit eba8327

File tree

1 file changed

+38
-21
lines changed
  • src/DataBoxEdge/DataBoxEdge.Test/ScenarioTests

1 file changed

+38
-21
lines changed

src/DataBoxEdge/DataBoxEdge.Test/ScenarioTests/Common.ps1

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,79 @@
1515

1616
<#
1717
.SYNOPSIS
18-
Gets valid Device Connection String
18+
Gets valid resource group name
1919
#>
20+
function Get-DeviceResourceGroupName
21+
{
22+
return "psrgpfortest"
23+
}
2024

21-
function Get-DeviceConnectionString
25+
<#
26+
.SYNOPSIS
27+
Gets valid resource name
28+
#>
29+
function Get-DeviceName
2230
{
23-
return "";
31+
return "psddataboxedgecan"
2432
}
2533

2634
<#
2735
.SYNOPSIS
28-
Gets valid IOT Device Connection String
36+
Gets valid resource name
2937
#>
30-
function Get-IotDeviceConnectionString
38+
function Get-VaultName
3139
{
32-
return "";
40+
return "azpsdbe"
3341
}
3442

43+
3544
<#
3645
.SYNOPSIS
37-
Returns Userpassword used for password
38-
Gets valid resource group name
39-
#>
40-
function Get-Userpassword
46+
Gets valid Device Connection String
47+
#>
48+
49+
function Get-DeviceConnectionString
4150
{
42-
return "";
51+
$vaultName = Get-VaultName
52+
$val = Get-AzKeyVaultSecret -VaultName $vaultName -Name "DeviceConnectionString"
53+
return $val.SecretValue
4354
}
4455

4556
<#
4657
.SYNOPSIS
47-
Returns standard EncryptionKey
58+
Gets valid IOT Device Connection String
4859
#>
49-
function Get-EncryptionKey
60+
function Get-IotDeviceConnectionString
5061
{
51-
$encryptionKey = ConvertTo-SecureString -String ""
52-
return $encryptionKey
62+
$vaultName = Get-VaultName
63+
$val = Get-AzKeyVaultSecret -VaultName $vaultName -Name "IotDeviceConnectionString"
64+
return $val.SecretValue
5365
}
5466

5567
<#
5668
.SYNOPSIS
69+
Returns Userpassword used for password
5770
Gets valid resource group name
58-
#>
59-
function Get-DeviceResourceGroupName
71+
#>
72+
function Get-Userpassword
6073
{
61-
return "psrgpfortest"
74+
$vaultName = Get-VaultName
75+
$val = Get-AzKeyVaultSecret -VaultName $vaultName -Name "UserPassword"
76+
return $val.SecretValue
6277
}
6378

6479
<#
6580
.SYNOPSIS
66-
Gets valid resource name
81+
Returns standard EncryptionKey
6782
#>
68-
function Get-DeviceName
83+
function Get-EncryptionKey
6984
{
70-
return "psdataboxedgedevice"
85+
$val = "faked"
86+
return ConvertTo-SecureString $val -AsPlainText -Force
7187
}
7288

7389

90+
7491
function Get-StringHash([String] $String,$HashName = "MD5")
7592
{
7693
$StringBuilder = New-Object System.Text.StringBuilder

0 commit comments

Comments
 (0)