Skip to content

Dataplanetest #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Storage/RegressionTests/adls_setaclresusive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BeforeAll {

[xml]$config = [xml]$config = Get-Content .\config.xml
$globalNode = $config.SelectSingleNode("config/section[@id='global']")
$testNode = $config.SelectSingleNode("config/section[@id='adlsSetAcl']")
$testNode = $config.SelectSingleNode("config/section[@id='adls']")

# Add-AzAccount

Expand Down Expand Up @@ -253,7 +253,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Set resume with ContinuationToken" {
It "Set resume with ContinuationToken" -Skip {
$Error.Clear()

ResetFileToFail
Expand All @@ -274,7 +274,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Update resume with ContinuationToken" {
It "Update resume with ContinuationToken" -SKip {
$Error.Clear()

ResetFileToFail
Expand All @@ -293,7 +293,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Remove resume with ContinuationToken" {
It "Remove resume with ContinuationToken" -SKip {
$Error.Clear()

ResetFileToFail
Expand All @@ -312,7 +312,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Set resume from failure by rerun set acl on the single failed files" {
It "Set resume from failure by rerun set acl on the single failed files" -SKip {
$Error.Clear()

ResetFileToFail
Expand Down Expand Up @@ -343,7 +343,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Update resume from failure by rerun set acl on the single failed files" {
It "Update resume from failure by rerun set acl on the single failed files" -SKip {
$Error.Clear()

ResetFileToFail
Expand Down Expand Up @@ -374,7 +374,7 @@ Describe "Set DataLakeGen2 Acl Recursive" {
$Error.Count | should -be 0
}

It "Remove resume from failure by rerun set acl on the single failed files" {
It "Remove resume from failure by rerun set acl on the single failed files" -SKip {
$Error.Clear()

ResetFileToFail
Expand Down
22 changes: 19 additions & 3 deletions src/Storage/RegressionTests/dataplane.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BeforeAll {
#$cred = New-Object System.Management.Automation.PSCredential ($globalNode.applicationId, $secpasswd)
#Add-AzAccount -ServicePrincipal -Tenant $globalNode.tenantId -SubscriptionId $globalNode.subscriptionId -Credential $cred

# COnnect-AzAccount
# Connect-AzAccount
$ctxoauth1 = New-AzStorageContext -StorageAccountName $storageAccountName
$ctxoauth2 = New-AzStorageContext -StorageAccountName $storageAccountName2

Expand Down Expand Up @@ -2414,8 +2414,6 @@ Describe "dataplane test" {
$error.Clear()

Remove-AzStorageShare -Name $shareName -Context $ctxkey -Force
Remove-AzStorageShare -Name $shareName -Context $ctxkey2 -Force


$Error.Count | should -be 0
}
Expand Down Expand Up @@ -2563,6 +2561,24 @@ Describe "dataplane test" {
$Error.Count | should -be 0
}

It "Upload file with write only SAS" {
$Error.Clear()
$sas = New-AzStorageAccountSASToken -Service File -ResourceType Container,Object,Service -Permission wc -ExpiryTime (Get-Date).AddDays(10) -Context $ctx
$ctxsas = New-AzStorageContext -StorageAccountName $storageAccountName -SasToken $sas

New-AzStorageDirectory -ShareName $containerName -Path testdirx1 -Context $ctx

$f = Set-AzStorageFileContent -ShareName $containerName -Source $localSmallSrcFile -Path testdirx1/file1. -Context $ctxsas -Force
$f = Get-AzStorageFile -ShareName $containerName -Path testdirx1/file1. -Context $ctx
$f.Name | Should -Be file1.
$Error.Count | Should -Be 0

$f = Set-AzStorageFileContent -ShareName $containerName -Source $localSmallSrcFile -Path testdirx1 -Context $ctxsas -Force -PassThru -ErrorAction SilentlyContinue
$error[0].Exception.Message
$Error.Clear()


}

It "Test case name" {
$Error.Clear()
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/RegressionTests/runStable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Import-Module $PSScriptRoot\utils.ps1

# $preview = $true

Invoke-Pester $PSScriptRoot\dataplane.ps1 -Show All -Strict # -TagFilter ToTest # -TagFilter blobversion,qq
Invoke-Pester $PSScriptRoot\dataplane.ps1 -Show All -Strict -ExcludeTagFilter "crossblobcopy" # -TagFilter ToTest # -TagFilter blobversion,qq
Invoke-Pester $PSScriptRoot\adls.ps1 -Show All -Strict
Invoke-Pester $PSScriptRoot\adls_setaclresusive.ps1 -Show All -Strict
Invoke-Pester $PSScriptRoot\srp.ps1 -Show All -Strict -ExcludeTagFilter "longrunning" # -TagFilter "fail"
Expand Down