From e46880d86bb8c0e07ed8dc421e1074ac106a787e Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Wed, 16 Dec 2015 10:44:41 -0800 Subject: [PATCH 1/5] Add test commandlet + update test batch file --- .../Microsoft.CLU.Test/PipelineAliasTest.cs | 14 +++++++ src/CLU/Microsoft.CLU.Test/TestCLU.bat | 39 ++++++++++--------- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs b/src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs index 784e92e2022a..a3d92ecf8b70 100644 --- a/src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs +++ b/src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs @@ -96,4 +96,18 @@ protected override void ProcessRecord() WriteObject(new TestRecord() { Name = $"Matched {RecordName}", Value = $"Matched {Value}", SomethingElse = $"Matched {SomethingElse}" }); } } + + [Cmdlet(VerbsCommon.Show, "TestRecordFromParameter")] + public class ShowTestRecordFromParameter : PSCmdlet + { + + [Parameter(Mandatory = true, ValueFromPipeline = true)] + [Alias("Rec")] + public TestRecord Record { get; set; } + + protected override void ProcessRecord() + { + WriteObject(Record); + } + } } diff --git a/src/CLU/Microsoft.CLU.Test/TestCLU.bat b/src/CLU/Microsoft.CLU.Test/TestCLU.bat index fe7b0c29e5de..83ff25382704 100644 --- a/src/CLU/Microsoft.CLU.Test/TestCLU.bat +++ b/src/CLU/Microsoft.CLU.Test/TestCLU.bat @@ -1,30 +1,33 @@ SETLOCAL EnableExtensions ECHO Test return code success case -call azure success show +call azure success show 2> out.error REM We expect that the commands above succeed (return 0) -IF ERRORLEVEL 1 (EXIT /B 1) +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 azure success show --generatenonterminatingerror true -if ERRORLEVEL 1 goto :verify_error_code_2 -REM We expect the error code to be 1 - so we shouldn't be here -EXIT /B 1 -:verify_error_code_2 -IF ERRORLEVEL 2 (EXIT /B 1) +call azure 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 azure success show --generateterminatingerror true -if ERRORLEVEL 2 goto :verify_error_code_3 -REM We expect the error code to be 1 - so we shouldn't be here -EXIT /B 1 -:verify_error_code_3 -IF ERRORLEVEL 3 (EXIT /B 1) +call azure 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 azure test record new > testrecordnew.json -call azure test record show < testrecordnew.json +call azure test record new | azure test record show > out.txt +IF %ERRORLEVEL% NEQ 0 ( + ECHO "Expected error level 0 for success, got " %ERRORLEVEL% + EXIT /B 1 +) -REM We expect that the commands above succeed -IF ERRORLEVEL 1 (EXIT /B 1) +ECHO ALL TESTS ARE HAPPY From 16b40d1c53f983d5999c88649b49cc0b403baf98 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Thu, 17 Dec 2015 14:46:58 -0800 Subject: [PATCH 2/5] Escape parameters oassed from generated (bash/sh) shell script to clurun correctly --- src/CLU/Microsoft.CLU.Run/PackageManagementMode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CLU/Microsoft.CLU.Run/PackageManagementMode.cs b/src/CLU/Microsoft.CLU.Run/PackageManagementMode.cs index 47b83712a389..7b28eae50f0e 100644 --- a/src/CLU/Microsoft.CLU.Run/PackageManagementMode.cs +++ b/src/CLU/Microsoft.CLU.Run/PackageManagementMode.cs @@ -548,7 +548,7 @@ private static void GenerateScript(string cfgPath) " export CmdletSessionID=$PPID", "fi", "SCRIPTPATH=$(dirname \"$0\")", - $"$SCRIPTPATH/clurun -s {scriptName} -r $SCRIPTPATH/{Path.GetFileName(cfgPath)} $*" + $"$SCRIPTPATH/clurun -s {scriptName} -r $SCRIPTPATH/{Path.GetFileName(cfgPath)} \"$@\"" }); System.Diagnostics.Process.Start("chmod", $"777 {scriptPath}"); } From bd2559966a78223f72fad68fea2300687a445350 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Thu, 17 Dec 2015 15:17:34 -0800 Subject: [PATCH 3/5] Rename scenario test project to differentiate from unit tests. Rename the "cli namespace" used from azure to testcli Update build script to pick any .lx file instead of limiting to only azure.lx --- src/CLU/CLUCoreCLR.sln | 12 +++---- .../Microsoft.CLU.Test/Content/package.cfg | 4 --- .../Content/package.cfg | 4 +++ .../Content/testclu.lx} | 3 +- ...icrosoft.ScenarioTest.CLU.nuspec.template} | 4 +-- .../Microsoft.ScenarioTest.CLU.xproj} | 0 .../PipelineAliasTest.cs | 0 .../Properties/AssemblyInfo.cs | 4 +-- .../ReturnCodeTest.cs | 0 src/CLU/Microsoft.ScenarioTests.CLU/out.txt | 33 +++++++++++++++++++ .../project.json | 0 .../testrunner.bat} | 8 ++--- tools/CLU/BuildPackage.ps1 | 2 +- 13 files changed, 53 insertions(+), 21 deletions(-) delete mode 100644 src/CLU/Microsoft.CLU.Test/Content/package.cfg create mode 100644 src/CLU/Microsoft.ScenarioTests.CLU/Content/package.cfg rename src/CLU/{Microsoft.CLU.Test/Content/azure.lx => Microsoft.ScenarioTests.CLU/Content/testclu.lx} (72%) rename src/CLU/{Microsoft.CLU.Test/Microsoft.CLU.Test.nuspec.template => Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.nuspec.template} (94%) rename src/CLU/{Microsoft.CLU.Test/Microsoft.CLU.Test.xproj => Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.xproj} (100%) rename src/CLU/{Microsoft.CLU.Test => Microsoft.ScenarioTests.CLU}/PipelineAliasTest.cs (100%) rename src/CLU/{Microsoft.CLU.Test => Microsoft.ScenarioTests.CLU}/Properties/AssemblyInfo.cs (92%) rename src/CLU/{Microsoft.CLU.Test => Microsoft.ScenarioTests.CLU}/ReturnCodeTest.cs (100%) create mode 100644 src/CLU/Microsoft.ScenarioTests.CLU/out.txt rename src/CLU/{Microsoft.CLU.Test => Microsoft.ScenarioTests.CLU}/project.json (100%) rename src/CLU/{Microsoft.CLU.Test/TestCLU.bat => Microsoft.ScenarioTests.CLU/testrunner.bat} (74%) diff --git a/src/CLU/CLUCoreCLR.sln b/src/CLU/CLUCoreCLR.sln index bf8dbefe8ea0..74c93d63140d 100644 --- a/src/CLU/CLUCoreCLR.sln +++ b/src/CLU/CLUCoreCLR.sln @@ -37,8 +37,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Run", "Micros EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU", "Microsoft.CLU\Microsoft.CLU.xproj", "{D0A59671-088D-463B-B060-2ADAFFB9C3F6}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Test", "Microsoft.CLU.Test\Microsoft.CLU.Test.xproj", "{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Compute", "Microsoft.Azure.Commands.Compute\Microsoft.Azure.Commands.Compute.xproj", "{04F9968A-5662-4508-BEE2-31F56848FCBA}" ProjectSection(ProjectDependencies) = postProject {99B1290D-A073-4907-8018-51C714431778} = {99B1290D-A073-4907-8018-51C714431778} @@ -55,6 +53,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Co {04F9968A-5662-4508-BEE2-31F56848FCBA} = {04F9968A-5662-4508-BEE2-31F56848FCBA} EndProjectSection EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.ScenarioTest.CLU", "Microsoft.ScenarioTests.CLU\Microsoft.ScenarioTest.CLU.xproj", "{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -129,10 +129,6 @@ Global {D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Release|Any CPU.Build.0 = Release|Any CPU - {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.Build.0 = Release|Any CPU {04F9968A-5662-4508-BEE2-31F56848FCBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {04F9968A-5662-4508-BEE2-31F56848FCBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {04F9968A-5662-4508-BEE2-31F56848FCBA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -141,6 +137,10 @@ Global {13C34370-51A4-4726-81B8-BE0996FC9CFF}.Debug|Any CPU.Build.0 = Debug|Any CPU {13C34370-51A4-4726-81B8-BE0996FC9CFF}.Release|Any CPU.ActiveCfg = Release|Any CPU {13C34370-51A4-4726-81B8-BE0996FC9CFF}.Release|Any CPU.Build.0 = Release|Any CPU + {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/CLU/Microsoft.CLU.Test/Content/package.cfg b/src/CLU/Microsoft.CLU.Test/Content/package.cfg deleted file mode 100644 index 48c45e1cedd8..000000000000 --- a/src/CLU/Microsoft.CLU.Test/Content/package.cfg +++ /dev/null @@ -1,4 +0,0 @@ -Name: Microsoft.CLU.Test -CommandAssemblies: Microsoft.CLU.Test.dll -NounPrefix: Test -NounFirst: true diff --git a/src/CLU/Microsoft.ScenarioTests.CLU/Content/package.cfg b/src/CLU/Microsoft.ScenarioTests.CLU/Content/package.cfg new file mode 100644 index 000000000000..cab24c1a6453 --- /dev/null +++ b/src/CLU/Microsoft.ScenarioTests.CLU/Content/package.cfg @@ -0,0 +1,4 @@ +Name: Microsoft.ScenarioTests.CLU +CommandAssemblies: Microsoft.ScenarioTests.CLU.dll +NounPrefix: Test +NounFirst: true diff --git a/src/CLU/Microsoft.CLU.Test/Content/azure.lx b/src/CLU/Microsoft.ScenarioTests.CLU/Content/testclu.lx similarity index 72% rename from src/CLU/Microsoft.CLU.Test/Content/azure.lx rename to src/CLU/Microsoft.ScenarioTests.CLU/Content/testclu.lx index f65eed0d5de1..50ddf444dfeb 100644 --- a/src/CLU/Microsoft.CLU.Test/Content/azure.lx +++ b/src/CLU/Microsoft.ScenarioTests.CLU/Content/testclu.lx @@ -1,5 +1,4 @@ RtPackage: Microsoft.CLU.Commands RtEntry: Microsoft.CLU.CommandModel.CmdletCommandModel.Run RtAssembly: Microsoft.CLU.dll -Modules: Microsoft.CLU.Test -NounPrefix: AzureRm \ No newline at end of file +Modules: Microsoft.ScenarioTests.CLU diff --git a/src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.nuspec.template b/src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.nuspec.template similarity index 94% rename from src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.nuspec.template rename to src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.nuspec.template index 83ad6d5a41fb..aed46e80a629 100644 --- a/src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.nuspec.template +++ b/src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.nuspec.template @@ -1,7 +1,7 @@ - + - Microsoft.CLU.Test + Microsoft.ScenarioTests.CLU Microsoft CLU CommandLine test command packge %PackageVersion% Microsoft diff --git a/src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.xproj b/src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.xproj similarity index 100% rename from src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.xproj rename to src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.xproj diff --git a/src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs b/src/CLU/Microsoft.ScenarioTests.CLU/PipelineAliasTest.cs similarity index 100% rename from src/CLU/Microsoft.CLU.Test/PipelineAliasTest.cs rename to src/CLU/Microsoft.ScenarioTests.CLU/PipelineAliasTest.cs diff --git a/src/CLU/Microsoft.CLU.Test/Properties/AssemblyInfo.cs b/src/CLU/Microsoft.ScenarioTests.CLU/Properties/AssemblyInfo.cs similarity index 92% rename from src/CLU/Microsoft.CLU.Test/Properties/AssemblyInfo.cs rename to src/CLU/Microsoft.ScenarioTests.CLU/Properties/AssemblyInfo.cs index afb2e0006b39..a7c508c7371b 100644 --- a/src/CLU/Microsoft.CLU.Test/Properties/AssemblyInfo.cs +++ b/src/CLU/Microsoft.ScenarioTests.CLU/Properties/AssemblyInfo.cs @@ -18,11 +18,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Microsoft.CLU.Test")] +[assembly: AssemblyTitle("Microsoft.ScenarioTests.CLU")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.CLU.Test")] +[assembly: AssemblyProduct("Microsoft.ScenarioTests.CLU")] [assembly: AssemblyCopyright("Copyright © Microsoft")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/CLU/Microsoft.CLU.Test/ReturnCodeTest.cs b/src/CLU/Microsoft.ScenarioTests.CLU/ReturnCodeTest.cs similarity index 100% rename from src/CLU/Microsoft.CLU.Test/ReturnCodeTest.cs rename to src/CLU/Microsoft.ScenarioTests.CLU/ReturnCodeTest.cs diff --git a/src/CLU/Microsoft.ScenarioTests.CLU/out.txt b/src/CLU/Microsoft.ScenarioTests.CLU/out.txt new file mode 100644 index 000000000000..9049fdcb405b --- /dev/null +++ b/src/CLU/Microsoft.ScenarioTests.CLU/out.txt @@ -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 diff --git a/src/CLU/Microsoft.CLU.Test/project.json b/src/CLU/Microsoft.ScenarioTests.CLU/project.json similarity index 100% rename from src/CLU/Microsoft.CLU.Test/project.json rename to src/CLU/Microsoft.ScenarioTests.CLU/project.json diff --git a/src/CLU/Microsoft.CLU.Test/TestCLU.bat b/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat similarity index 74% rename from src/CLU/Microsoft.CLU.Test/TestCLU.bat rename to src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat index 83ff25382704..3ec59e2dc536 100644 --- a/src/CLU/Microsoft.CLU.Test/TestCLU.bat +++ b/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat @@ -1,7 +1,7 @@ SETLOCAL EnableExtensions ECHO Test return code success case -call azure success show 2> out.error +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% @@ -9,21 +9,21 @@ IF %ERRORLEVEL% NEQ 0 ( ) ECHO Test return codes non terminating error case -call azure success show --generatenonterminatingerror true 2> out.error +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 azure success show --generateterminatingerror true 2> out.error +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 azure test record new | azure test record show > out.txt +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 diff --git a/tools/CLU/BuildPackage.ps1 b/tools/CLU/BuildPackage.ps1 index 6beefbc67529..63c7042e3a40 100644 --- a/tools/CLU/BuildPackage.ps1 +++ b/tools/CLU/BuildPackage.ps1 @@ -34,7 +34,7 @@ $contentFileText = "" $contentFiles | %{ $contentFileText += (" `r`n")} if ($packageId -ne "Microsoft.CLU.Commands") { - $contentFileText += " `r`n" + $contentFileText += " `r`n" } if ($renameFileExists) { From 4df358d0fd467ef76324688d941fbd88e23ce091 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Thu, 17 Dec 2015 16:33:42 -0800 Subject: [PATCH 4/5] Changing tabs to spaces --- .../Microsoft.ScenarioTests.CLU/testrunner.bat | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat b/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat index 3ec59e2dc536..97ee43252814 100644 --- a/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat +++ b/src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat @@ -4,29 +4,29 @@ 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 "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 "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 "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 "Expected error level 0 for success, got " %ERRORLEVEL% + EXIT /B 1 ) From 56898cbedbe83bf28d6f716d1a1700fc5e5d0fc6 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Thu, 17 Dec 2015 16:45:05 -0800 Subject: [PATCH 5/5] Remove temp file that accidentally got included... --- src/CLU/Microsoft.ScenarioTests.CLU/out.txt | 33 --------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/CLU/Microsoft.ScenarioTests.CLU/out.txt diff --git a/src/CLU/Microsoft.ScenarioTests.CLU/out.txt b/src/CLU/Microsoft.ScenarioTests.CLU/out.txt deleted file mode 100644 index 9049fdcb405b..000000000000 --- a/src/CLU/Microsoft.ScenarioTests.CLU/out.txt +++ /dev/null @@ -1,33 +0,0 @@ -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