Skip to content
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

Fix dataplane tests #47

Merged
merged 1 commit into from
Nov 14, 2024
Merged
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
9 changes: 7 additions & 2 deletions src/Storage/RegressionTests/dataplane.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Describe "dataplane test" {
$Error.Clear()

Set-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName -AllowBlobPublicAccess $true
sleep 120 # Set sleep time to 2 min to make sure AllowBlobPublicAccess becomes True
## regression test for Fix Set-AzStorageContainerAcl can clean up the stored Access Policy
New-AzStorageContainerStoredAccessPolicy -Container $containerName -Policy 123 -Permission rw -Context $ctx
New-AzStorageContainerStoredAccessPolicy -Container $containerName -Policy 234 -Permission rwdl -Context $ctx
Expand Down Expand Up @@ -743,7 +744,9 @@ Describe "dataplane test" {
New-AzStorageEncryptionScope -ResourceGroupName $resourceGroupName -StorageAccountName $storageAccountName -EncryptionScopeName $scopeName1 -StorageEncryption
New-AzStorageEncryptionScope -ResourceGroupName $resourceGroupName -StorageAccountName $storageAccountName -EncryptionScopeName $scopeName2 -StorageEncryption
Set-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName -AllowBlobPublicAccess $true
sleep 10

sleep 120 # Make sleep time 2 min to make sure AllowBlobPublicAccess is True

try{

$containerName_es = $containerName + "es"
Expand Down Expand Up @@ -2388,6 +2391,8 @@ Describe "dataplane test" {
Set-AzStorageServiceMetricsProperty -ServiceType File -MetricsType Hour -Context $ctxoauth -ErrorAction SilentlyContinue
$error[0].Exception.Message | should -BeLike "*Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.*"

$error.Clear()

# should fail since file sas can only create with sharedkey
$file | New-AzStorageFileSASToken -Permission rw -ErrorAction SilentlyContinue
New-AzStorageFileSASToken -ShareName $shareName -Path $file.ShareFileClient.Path -Permission rw -Context $ctxoauth -ErrorAction SilentlyContinue
Expand All @@ -2400,7 +2405,7 @@ Describe "dataplane test" {
$error.Count | should -be 8
foreach ($e in $error)
{
$e.Exception.Message | should -BeLike "*Create File service SAS only supported with SharedKey credentail.*"
$e.Exception.Message | should -BeLike "*Create File service SAS only supported with SharedKey credential.*"
}
$error.Clear()

Expand Down