Skip to content

Commit e8e228d

Browse files
authored
Merge pull request Azure#29 from wastoresh/testupdate
Update regression tests
2 parents b03208a + 851f6eb commit e8e228d

File tree

4 files changed

+20
-23
lines changed

4 files changed

+20
-23
lines changed

src/Storage/RegressionTests/adls_setaclresusive.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ BeforeAll {
4444
Add-AzAccount -ServicePrincipal -Tenant $globalNode.tenantId -SubscriptionId $globalNode.subscriptionId -Credential $cred
4545

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

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

5252
$filesystemName = "adlstest2"
53-
$localSrcFile = ".\data\testfile_1024K_0" #The file needs to exist before tests, and should be 512 bytes aligned
53+
$localSrcFile = ".\data\testfile_1K_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/dataplane.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ BeforeAll {
2828

2929
$localSrcFile = ".\data\testfile_10240K_0" # The file needs to exist before tests, and the size should be 10240K
3030
$localSmallSrcFile = ".\data\testfile_1K_0" # The file needs to exist before tests, abd the size should be 1K
31-
$localBigSrcFile = ".\data\testfile_300000K_0"# The file needs to exist before tests, and the size should be 300000K
31+
$localBigSrcFile = ".\data\testfile_300M" # The file needs to exist before tests, and the size should be 300000K
3232

3333
$localDestFile = ".\created\test1.txt" # test will create the file
3434
$containerName = GetRandomContainerName

src/Storage/RegressionTests/dataplane_preview.ps1

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
BeforeAll {
22
# Modify the path to your own
3-
Import-Module D:\code\azure-powershell\src\Storage\RegressionTests\utils.ps1
3+
Import-Module .\utils.ps1
44

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

9-
cd C:\temp # This directory should exist before tests
10-
119
$resourceGroupName = $globalNode.resourceGroupName
1210
$storageAccountName = $testNode.accountName
1311

1412
$key = (Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccountName)[0].Value
15-
$ctx = New-AzStorageContext -StorageAccountName weirp1 -StorageAccountKey $key
16-
$localSrcFile = "C:\temp\testfile_10240K_0" #The file need exist before test, and should be 512 bytes aligned
17-
$localDestFile = "C:\temp\testpreview.txt" # test will create the file
13+
$ctx = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $key
14+
$localSrcFile = ".\data\testfile_1K_0" #The file need exist before test, and should be 512 bytes aligned
15+
$localDestFile = ".\created\testpreview.txt" # test will create the file
1816
$containerName = GetRandomContainerName
1917
# $containerName = "weitestpreview"
2018

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11

2-
Import-Module C:\code\PSH_Dev\artifacts\Debug\Az.Accounts\Az.Accounts.psd1
3-
Import-Module C:\code\PSH_Dev\artifacts\Debug\Az.Storage\Az.Storage.psd1
2+
# Import-Module C:\code\PSH_Dev\artifacts\Debug\Az.Accounts\Az.Accounts.psd1
3+
# Import-Module C:\code\PSH_Dev\artifacts\Debug\Az.Storage\Az.Storage.psd1
44

55

66
$preview = $true
7-
8-
Import-Module C:\Users\weiwei\Desktop\PSH_Script\Assert.ps1
9-
Import-Module C:\Users\weiwei\Desktop\PSH_Script\PSHTest\utils.ps1
7+
cd $PSScriptRoot
8+
Import-Module $PSScriptRoot\utils.ps1
109

1110
# GA feature
12-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\dataplane.ps1 -Show All -Strict # -TagFilter blobversion # -TagFilter ToTest
13-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\adls.ps1 -Show All -Strict
14-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\adls_setaclresusive.ps1 -Show All -Strict
15-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\srp.ps1 -Show All -Strict -ExcludeTagFilter "longrunning" # -TagFilter "fail"
11+
Invoke-Pester $PSScriptRoot\dataplane.ps1 -Show All -Strict # -TagFilter blobversion # -TagFilter ToTest
12+
Invoke-Pester $PSScriptRoot\adls.ps1 -Show All -Strict
13+
Invoke-Pester $PSScriptRoot\adls_setaclresusive.ps1 -Show All -Strict
14+
Invoke-Pester $PSScriptRoot\srp.ps1 -Show All -Strict -ExcludeTagFilter "longrunning" # -TagFilter "fail"
1615

1716

1817
#preview feature
19-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\dataplane_preview.ps1 -Show All -Strict #-TagFilter "Totest"
20-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\srp_preview.ps1 -Show All -Strict -ExcludeTagFilter "longrunning" # -TagFilter "VLW"
18+
Invoke-Pester $PSScriptRoot\dataplane_preview.ps1 -Show All -Strict #-TagFilter "Totest"
19+
Invoke-Pester $PSScriptRoot\srp_preview.ps1 -Show All -Strict -ExcludeTagFilter "longrunning" # -TagFilter "VLW"
2120

2221
# long running
23-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\srp_preview.ps1 -Show All -Strict -TagFilter "longrunning"
24-
Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\srp.ps1 -Show All -Strict -TagFilter "longrunning"
22+
Invoke-Pester $PSScriptRoot\srp_preview.ps1 -Show All -Strict -TagFilter "longrunning"
23+
Invoke-Pester $PSScriptRoot\srp.ps1 -Show All -Strict -TagFilter "longrunning"

0 commit comments

Comments
 (0)