Skip to content

Commit b03208a

Browse files
authored
Merge pull request Azure#28 from wastoresh/testupdate
Update regression tests
2 parents e50dee2 + a102f8c commit b03208a

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/Storage/RegressionTests/adls.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33

44
BeforeAll {
55
# Modify the path to your own
6-
Import-Module $PSScriptRoot\utils.ps1
6+
Import-Module .\utils.ps1
77

8-
[xml]$config = Get-Content D:\code\azure-powershell\src\Storage\RegressionTests\config.xml
8+
[xml]$config = Get-Content .\config.xml
99
$globalNode = $config.SelectSingleNode("config/section[@id='global']")
1010
$testNode = $config.SelectSingleNode("config/section[@id='adls']")
1111

1212
# Create the directory C:\temp locally before tests
13-
$rootFolder = "C:\temp"
14-
cd $rootFolder
13+
#$rootFolder = "C:\temp"
14+
#cd $rootFolder
1515

1616
$rgname = $globalNode.resourceGroupName
1717
$accountName = $testNode.accountName
1818
$ctx = (Get-AzStorageAccount -ResourceGroupName $rgname -Name $accountName).Context
1919

20-
$localSrcFile = "C:\temp\testfile_1K_0" #The file need exist before test, and should be 512 bytes aligned
21-
$localDestFile = "C:\temp\test1.txt" # test will create the file
20+
$localSrcFile = ".\data\testfile_1K_0" #The file need exist before test, and should be 512 bytes aligned
21+
$localDestFile = ".\created\test1.txt" # test will create the file
2222
$filesystemName = "filesystem1"
2323
$dirname1 = "dir1"
2424
$dirname2 = "dir2/"

src/Storage/RegressionTests/adls_setaclresusive.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ function ResetFileToSuccess
3333

3434
BeforeAll {
3535
# Modify the path to your own
36-
Import-Module $PSScriptRoot\utils.ps1
36+
Import-Module .\utils.ps1
3737

38-
[xml]$config = Get-Content D:\code\azure-powershell\src\Storage\RegressionTests\config.xml
38+
[xml]$config = [xml]$config = Get-Content .\config.xml
3939
$globalNode = $config.SelectSingleNode("config/section[@id='global']")
4040
$testNode = $config.SelectSingleNode("config/section[@id='adlsSetAcl']")
4141

@@ -44,13 +44,13 @@ BeforeAll {
4444
Add-AzAccount -ServicePrincipal -Tenant $globalNode.tenantId -SubscriptionId $globalNode.subscriptionId -Credential $cred
4545

4646
$resourceGroupName = $globalNode.resourceGroupName
47-
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -Name $testNode.accountName)[0].Value
47+
$storageAccountKey = $testNode.accountKey
4848

4949
$ctx = New-AzStorageContext $testNode.accountName -StorageAccountKey $storageAccountKey
5050
$ctx2 = New-AzStorageContext $testNode.accountName
5151

5252
$filesystemName = "adlstest2"
53-
$localSrcFile = "C:\temp\testfile_1K_0" #The file needs to exist before tests, and should be 512 bytes aligned
53+
$localSrcFile = ".\data\testfile_1024K_0" #The file needs to exist before tests, and should be 512 bytes aligned
5454
$id = $globalNode.applicationId
5555

5656
# for lease blob to make set acl recusive fail

src/Storage/RegressionTests/srp.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ Describe "Management plan test" {
12221222
$properties = Get-AzStorageBlobServiceProperty -ResourceGroupName $rgname -StorageAccountName $accountNamePITR
12231223
$properties.RestorePolicy.Enabled | should -Be $false
12241224

1225-
Remove-AzStorageAccount -ResourceGroupName $globalNode.resourceGroupName -Name $accountNamePITR
1225+
Remove-AzStorageAccount -ResourceGroupName $globalNode.resourceGroupName -Name $accountNamePITR -Force -AsJob
12261226

12271227
$Error.Clear()
12281228
$Error.Count | should -be 0
@@ -1233,7 +1233,7 @@ Describe "Management plan test" {
12331233

12341234
$shareName1 = "test01"
12351235
$shareName2 = "test02"
1236-
$accountNameSSD = $accountName + "sharesoftdel"
1236+
$accountNameSSD = $accountName + "sdel"
12371237

12381238
New-AzStorageAccount -ResourceGroupName $rgname -Name $accountNameSSD -SkuName Standard_LRS -Location eastus
12391239

src/Storage/RegressionTests/srp_preview.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\dataplane.ps1 -Show All -Strict -ExcludeTagFilter "Preview"
22

33
BeforeAll {
4-
Import-Module D:\code\azure-powershell\src\Storage\RegressionTests\utils.ps1
4+
Import-Module .\utils.ps1
55

6-
[xml]$config = Get-Content D:\code\azure-powershell\src\Storage\RegressionTests\config.xml
6+
[xml]$config = Get-Content .\config.xml
77
$globalNode = $config.SelectSingleNode("config/section[@id='global']")
88
$testNode = $config.SelectSingleNode("config/section[@id='srp']")
99

0 commit comments

Comments
 (0)