Skip to content

Commit 7400f17

Browse files
authored
Update some test cases (#661)
* Update some testcase Add some testcases and delete some failed testcases * Revert "Update some testcase" This reverts commit 38b9e87. * Submit some test cases and fix some problems with the script
1 parent b861314 commit 7400f17

49 files changed

Lines changed: 3785 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests-upgrade/AutoRestUpgradeTest.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ if(!(Test-Path CompareResult))
66
{
77
New-Item CompareResult -ItemType "directory"
88
}
9+
#Define the success code names
10+
$global:testNameStr
911
#Define the global param 'isError' to determine wheather throw the error
1012
$global:isError = $false
1113
#Import the Configuration Json
@@ -226,8 +228,11 @@ function CompareGeneratedCode([string]$inputSourcePath,[string]$inputTargetPath,
226228
{
227229
$global:isError=$True
228230
$filename = Join-Path $PSScriptRoot 'CompareResult' ($testFileName + (get-date -format 'yyyyMMddhhmmss') + '.csv')
229-
$difArray | Select-Object -Property fileName,Path,fileFolderName,Status | Export-CSV -path $filename
231+
$difArray | Select-Object -Property fileName,Path,fileFolderName,Status | Sort-Object -Property fileName | Export-CSV -path $filename
230232
Write-Warning ('There are ' + $difArray.Count + ' different files')
233+
}else
234+
{
235+
$global:testNameStr+= $testFileName +"`n"
231236
}
232237
}
233238

@@ -328,6 +333,8 @@ else
328333
}
329334
}
330335
cd $PSScriptRoot
336+
write-Host $global:testNameStr
337+
$global:testNameStr | Out-File .\CompareResult\GenerateSuccessList.Txt
331338
#Throw error if there are some different
332339
if($global:isError)
333340
{

tests-upgrade/Configuration.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
"extension-ms-discriminatorvalue",
3333
"extension-ms-examples",
3434
"extension-ms-longruningoperation",
35+
"extension-ms-mutability",
3536
"extension-ms-pageable",
37+
"extension-ms-paramlocation",
3638
"directive-aliasremoval",
3739
"directive-cmdlet",
3840
"directive-parameter"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### AutoRest Configuration
2+
> see https://aka.ms/autorest
3+
4+
``` yaml
5+
require:
6+
- $(this-folder)/../readme.azure.noprofile.md
7+
input-file:
8+
- $(this-folder)/swagger.json
9+
10+
```

0 commit comments

Comments
 (0)