-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Update tests + escape paramters passed to clurun by (bash) wrapper script #1519
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
Changes from 4 commits
e46880d
16b40d1
bd25599
7db3e1b
4df358d
56898cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Name: Microsoft.ScenarioTests.CLU | ||
| CommandAssemblies: Microsoft.ScenarioTests.CLU.dll | ||
| NounPrefix: Test | ||
| NounFirst: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| RtPackage: Microsoft.CLU.Commands | ||
| RtEntry: Microsoft.CLU.CommandModel.CmdletCommandModel.Run | ||
| RtAssembly: Microsoft.CLU.dll | ||
| Modules: Microsoft.CLU.Test | ||
| NounPrefix: AzureRm | ||
| Modules: Microsoft.ScenarioTests.CLU |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| SETLOCAL EnableExtensions | ||
|
|
||
| ECHO Test return code success case | ||
| call testclu success show 2> out.error | ||
| REM We expect that the commands above succeed (return 0) | ||
| IF %ERRORLEVEL% NEQ 0 ( | ||
| ECHO "Expected error level 0 for success, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test return codes non terminating error case | ||
| call testclu success show --generatenonterminatingerror true 2> out.error | ||
| IF %ERRORLEVEL% NEQ 1 ( | ||
| ECHO "Expected error level 1 for non-terminating error, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test return codes terminating error case | ||
| call testclu success show --generateterminatingerror true 2> out.error | ||
| IF %ERRORLEVEL% NEQ 2 ( | ||
| ECHO "Expected error level 2 for terminating error, got " %ERRORLEVEL% | ||
|
||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test pipeline aliasing | ||
| call testclu test record new | testclu test record show > out.txt | ||
| IF %ERRORLEVEL% NEQ 0 ( | ||
| ECHO "Expected error level 0 for success, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
|
|
||
| ECHO ALL TESTS ARE HAPPY | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| SETLOCAL EnableExtensions | ||
|
|
||
| ECHO Test return code success case | ||
| call testclu success show 2> out.error | ||
| REM We expect that the commands above succeed (return 0) | ||
| IF %ERRORLEVEL% NEQ 0 ( | ||
| ECHO "Expected error level 0 for success, got " %ERRORLEVEL% | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should tab be 4 spaces?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed. From: Yugang Wang [mailto:[email protected]] In src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bathttps://github.com//pull/1519#discussion_r47980597:
should tab be 4 spaces? — |
||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test return codes non terminating error case | ||
| call testclu success show --generatenonterminatingerror true 2> out.error | ||
| IF %ERRORLEVEL% NEQ 1 ( | ||
| ECHO "Expected error level 1 for non-terminating error, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test return codes terminating error case | ||
| call testclu success show --generateterminatingerror true 2> out.error | ||
| IF %ERRORLEVEL% NEQ 2 ( | ||
| ECHO "Expected error level 2 for terminating error, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
| ECHO Test pipeline aliasing | ||
| call testclu record new | testclu record show > out.txt | ||
| IF %ERRORLEVEL% NEQ 0 ( | ||
| ECHO "Expected error level 0 for success, got " %ERRORLEVEL% | ||
| EXIT /B 1 | ||
| ) | ||
|
|
||
|
|
||
| ECHO ALL TESTS ARE HAPPY | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you want to dump out the out.err?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I actually, don’t ☺
From: Yugang Wang [mailto:[email protected]]
Sent: Thursday, December 17, 2015 4:20 PM
To: Azure/azure-powershell [email protected]
Cc: Johan Stenberg [email protected]
Subject: Re: [azure-powershell] Update tests + escape paramters passed to clurun by (bash) wrapper script (#1519)
In src/CLU/Microsoft.ScenarioTests.CLU/out.txthttps://github.com//pull/1519#discussion_r47980704:
you want to dump out the out.err?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1519/files#r47980704.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is fine. To me it would be normal to swallow the stdout but still let stderr surface to the console, but it is your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally, I’d agree. However, these tests are verifying that the CLU behaves correctly if there is an error. Thus, the info written to stderr by the cmdlet is not of interest to us and would only pollute the log.
From: Yugang Wang [mailto:[email protected]]
Sent: Thursday, December 17, 2015 4:45 PM
To: Azure/azure-powershell [email protected]
Cc: Johan Stenberg [email protected]
Subject: Re: [azure-powershell] Update tests + escape paramters passed to clurun by (bash) wrapper script (#1519)
In src/CLU/Microsoft.ScenarioTests.CLU/out.txthttps://github.com//pull/1519#discussion_r47982357:
That is fine. To me it would be normal to swallow the stdout but still let stderr surface to the console, but it is your call.
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1519/files#r47982357.