File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed
src/Storage/RegressionTests Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 3
3
4
4
BeforeAll {
5
5
# Modify the path to your own
6
- Import-Module $PSScriptRoot \utils.ps1
6
+ Import-Module . \utils.ps1
7
7
8
- [xml ]$config = Get-Content D:\code\azure - powershell\src\Storage\RegressionTests \config.xml
8
+ [xml ]$config = Get-Content . \config.xml
9
9
$globalNode = $config.SelectSingleNode (" config/section[@id='global']" )
10
10
$testNode = $config.SelectSingleNode (" config/section[@id='adls']" )
11
11
12
12
# Create the directory C:\temp locally before tests
13
- $rootFolder = " C:\temp"
14
- cd $rootFolder
13
+ # $rootFolder = "C:\temp"
14
+ # cd $rootFolder
15
15
16
16
$rgname = $globalNode.resourceGroupName
17
17
$accountName = $testNode.accountName
18
18
$ctx = (Get-AzStorageAccount - ResourceGroupName $rgname - Name $accountName ).Context
19
19
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
22
22
$filesystemName = " filesystem1"
23
23
$dirname1 = " dir1"
24
24
$dirname2 = " dir2/"
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ function ResetFileToSuccess
33
33
34
34
BeforeAll {
35
35
# Modify the path to your own
36
- Import-Module $PSScriptRoot \utils.ps1
36
+ Import-Module . \utils.ps1
37
37
38
- [xml ]$config = Get-Content D:\code\azure - powershell\src\Storage\RegressionTests \config.xml
38
+ [xml ]$config = [ xml ] $config = Get-Content . \config.xml
39
39
$globalNode = $config.SelectSingleNode (" config/section[@id='global']" )
40
40
$testNode = $config.SelectSingleNode (" config/section[@id='adlsSetAcl']" )
41
41
@@ -44,13 +44,13 @@ BeforeAll {
44
44
Add-AzAccount - ServicePrincipal - Tenant $globalNode.tenantId - SubscriptionId $globalNode.subscriptionId - Credential $cred
45
45
46
46
$resourceGroupName = $globalNode.resourceGroupName
47
- $storageAccountKey = ( Get-AzStorageAccountKey - ResourceGroupName $resourceGroupName - Name $ testNode.accountName )[ 0 ].Value
47
+ $storageAccountKey = $ testNode.accountKey
48
48
49
49
$ctx = New-AzStorageContext $testNode.accountName - StorageAccountKey $storageAccountKey
50
50
$ctx2 = New-AzStorageContext $testNode.accountName
51
51
52
52
$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
54
54
$id = $globalNode.applicationId
55
55
56
56
# for lease blob to make set acl recusive fail
Original file line number Diff line number Diff line change @@ -1222,7 +1222,7 @@ Describe "Management plan test" {
1222
1222
$properties = Get-AzStorageBlobServiceProperty - ResourceGroupName $rgname - StorageAccountName $accountNamePITR
1223
1223
$properties.RestorePolicy.Enabled | should - Be $false
1224
1224
1225
- Remove-AzStorageAccount - ResourceGroupName $globalNode.resourceGroupName - Name $accountNamePITR
1225
+ Remove-AzStorageAccount - ResourceGroupName $globalNode.resourceGroupName - Name $accountNamePITR - Force - AsJob
1226
1226
1227
1227
$Error.Clear ()
1228
1228
$Error.Count | should - be 0
@@ -1233,7 +1233,7 @@ Describe "Management plan test" {
1233
1233
1234
1234
$shareName1 = " test01"
1235
1235
$shareName2 = " test02"
1236
- $accountNameSSD = $accountName + " sharesoftdel "
1236
+ $accountNameSSD = $accountName + " sdel "
1237
1237
1238
1238
New-AzStorageAccount - ResourceGroupName $rgname - Name $accountNameSSD - SkuName Standard_LRS - Location eastus
1239
1239
Original file line number Diff line number Diff line change 1
1
# Invoke-Pester C:\Users\weiwei\Desktop\PSH_Script\PSHTest\dataplane.ps1 -Show All -Strict -ExcludeTagFilter "Preview"
2
2
3
3
BeforeAll {
4
- Import-Module D:\code\azure - powershell\src\Storage\RegressionTests \utils.ps1
4
+ Import-Module . \utils.ps1
5
5
6
- [xml ]$config = Get-Content D:\code\azure - powershell\src\Storage\RegressionTests \config.xml
6
+ [xml ]$config = Get-Content . \config.xml
7
7
$globalNode = $config.SelectSingleNode (" config/section[@id='global']" )
8
8
$testNode = $config.SelectSingleNode (" config/section[@id='srp']" )
9
9
You can’t perform that action at this time.
0 commit comments