Skip to content

Commit 3b3b773

Browse files
authored
Merge pull request microsoft#237 from microsoft/jaimeta/filesupport
ensuring file support is enabled
2 parents ccff67e + 226101a commit 3b3b773

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

appveyor.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,19 @@ test_script:
9090
# Enable additional file formats
9191
$newSettings = New-Object PSCustomObject -Property @{"PropertyValues" = @( @{"@odata.type"="#Model.Property"; "Name" = "AllowedResourceExtensionsForUpload"; "Value" = "*,*.xml,*.xsd,*.xsl,*.png,*.gif,*.jpg,*.tif,*.jpeg,*.tiff,*.bmp,*.pdf,*.svg,*.rtf,*.txt,*.doc,*.docx,*.pps,*.ppt,*.pptx,*.xlsx"})}
9292
$stringNewRequest = $newSettings | ConvertTo-JSON -Depth 5
93-
try {Invoke-RestMethod -Uri "http://localhost/reports/api/v1.0/ReportServerInfo/Model.UpdateSettings" -Method POST -UseDefaultCredentials -ContentType 'application/json' -Body $stringNewRequest} catch {}
93+
$isAllowedFileFormatUpdated = $true
94+
for ($i=0 ; $i -le 10 -and $isAllowedFileFormatUpdated -eq $false ;i++){
95+
try{
96+
$isAllowedFileFormatUpdated = $true;
97+
Invoke-RestMethod -Uri "http://localhost/reports/api/v1.0/ReportServerInfo/Model.UpdateSettings" -Method POST -UseDefaultCredentials -ContentType 'application/json' -Body $stringNewRequest
98+
}
99+
catch{
100+
$isAllowedFileFormatUpdated = $false
101+
Start-Sleep -Seconds 1
102+
}
103+
}
104+
if ($isAllowedFileFormatUpdated -eq $false) {throw (New-Object System.Exception("Failed to update the AllowedResourceExtensionsForUpload")) }
105+
94106
95107
# Integration test section
96108
# Activate verbose on Powershell

0 commit comments

Comments
 (0)