Skip to content

Commit bd25599

Browse files
committed
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
1 parent 16b40d1 commit bd25599

File tree

13 files changed

+53
-21
lines changed

13 files changed

+53
-21
lines changed

src/CLU/CLUCoreCLR.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Run", "Micros
3737
EndProject
3838
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU", "Microsoft.CLU\Microsoft.CLU.xproj", "{D0A59671-088D-463B-B060-2ADAFFB9C3F6}"
3939
EndProject
40-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.CLU.Test", "Microsoft.CLU.Test\Microsoft.CLU.Test.xproj", "{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}"
41-
EndProject
4240
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Compute", "Microsoft.Azure.Commands.Compute\Microsoft.Azure.Commands.Compute.xproj", "{04F9968A-5662-4508-BEE2-31F56848FCBA}"
4341
ProjectSection(ProjectDependencies) = postProject
4442
{99B1290D-A073-4907-8018-51C714431778} = {99B1290D-A073-4907-8018-51C714431778}
@@ -55,6 +53,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Co
5553
{04F9968A-5662-4508-BEE2-31F56848FCBA} = {04F9968A-5662-4508-BEE2-31F56848FCBA}
5654
EndProjectSection
5755
EndProject
56+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.ScenarioTest.CLU", "Microsoft.ScenarioTests.CLU\Microsoft.ScenarioTest.CLU.xproj", "{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}"
57+
EndProject
5858
Global
5959
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6060
Debug|Any CPU = Debug|Any CPU
@@ -129,10 +129,6 @@ Global
129129
{D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
130130
{D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
131131
{D0A59671-088D-463B-B060-2ADAFFB9C3F6}.Release|Any CPU.Build.0 = Release|Any CPU
132-
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
133-
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
134-
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
135-
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.Build.0 = Release|Any CPU
136132
{04F9968A-5662-4508-BEE2-31F56848FCBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
137133
{04F9968A-5662-4508-BEE2-31F56848FCBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
138134
{04F9968A-5662-4508-BEE2-31F56848FCBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -141,6 +137,10 @@ Global
141137
{13C34370-51A4-4726-81B8-BE0996FC9CFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
142138
{13C34370-51A4-4726-81B8-BE0996FC9CFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
143139
{13C34370-51A4-4726-81B8-BE0996FC9CFF}.Release|Any CPU.Build.0 = Release|Any CPU
140+
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
141+
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
142+
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
143+
{91422B55-28A5-48DE-BCA0-30C3E30FFB1C}.Release|Any CPU.Build.0 = Release|Any CPU
144144
EndGlobalSection
145145
GlobalSection(SolutionProperties) = preSolution
146146
HideSolutionNode = FALSE

src/CLU/Microsoft.CLU.Test/Content/package.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Name: Microsoft.ScenarioTests.CLU
2+
CommandAssemblies: Microsoft.ScenarioTests.CLU.dll
3+
NounPrefix: Test
4+
NounFirst: true
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
RtPackage: Microsoft.CLU.Commands
22
RtEntry: Microsoft.CLU.CommandModel.CmdletCommandModel.Run
33
RtAssembly: Microsoft.CLU.dll
4-
Modules: Microsoft.CLU.Test
5-
NounPrefix: AzureRm
4+
Modules: Microsoft.ScenarioTests.CLU

src/CLU/Microsoft.CLU.Test/Microsoft.CLU.Test.nuspec.template renamed to src/CLU/Microsoft.ScenarioTests.CLU/Microsoft.ScenarioTest.CLU.nuspec.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?xml version="1.0"?>
1+
<?xml version="1.0"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata minClientVersion="2.5">
4-
<id>Microsoft.CLU.Test</id>
4+
<id>Microsoft.ScenarioTests.CLU</id>
55
<title>Microsoft CLU CommandLine test command packge</title>
66
<version>%PackageVersion%</version>
77
<authors>Microsoft</authors>

src/CLU/Microsoft.CLU.Test/Properties/AssemblyInfo.cs renamed to src/CLU/Microsoft.ScenarioTests.CLU/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
// General Information about an assembly is controlled through the following
1919
// set of attributes. Change these attribute values to modify the information
2020
// associated with an assembly.
21-
[assembly: AssemblyTitle("Microsoft.CLU.Test")]
21+
[assembly: AssemblyTitle("Microsoft.ScenarioTests.CLU")]
2222
[assembly: AssemblyDescription("")]
2323
[assembly: AssemblyConfiguration("")]
2424
[assembly: AssemblyCompany("")]
25-
[assembly: AssemblyProduct("Microsoft.CLU.Test")]
25+
[assembly: AssemblyProduct("Microsoft.ScenarioTests.CLU")]
2626
[assembly: AssemblyCopyright("Copyright © Microsoft")]
2727
[assembly: AssemblyTrademark("")]
2828
[assembly: AssemblyCulture("")]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
SETLOCAL EnableExtensions
2+
3+
ECHO Test return code success case
4+
call testclu success show 2> out.error
5+
REM We expect that the commands above succeed (return 0)
6+
IF %ERRORLEVEL% NEQ 0 (
7+
ECHO "Expected error level 0 for success, got " %ERRORLEVEL%
8+
EXIT /B 1
9+
)
10+
11+
ECHO Test return codes non terminating error case
12+
call testclu success show --generatenonterminatingerror true 2> out.error
13+
IF %ERRORLEVEL% NEQ 1 (
14+
ECHO "Expected error level 1 for non-terminating error, got " %ERRORLEVEL%
15+
EXIT /B 1
16+
)
17+
18+
ECHO Test return codes terminating error case
19+
call testclu success show --generateterminatingerror true 2> out.error
20+
IF %ERRORLEVEL% NEQ 2 (
21+
ECHO "Expected error level 2 for terminating error, got " %ERRORLEVEL%
22+
EXIT /B 1
23+
)
24+
25+
ECHO Test pipeline aliasing
26+
call testclu test record new | testclu test record show > out.txt
27+
IF %ERRORLEVEL% NEQ 0 (
28+
ECHO "Expected error level 0 for success, got " %ERRORLEVEL%
29+
EXIT /B 1
30+
)
31+
32+
33+
ECHO ALL TESTS ARE HAPPY

src/CLU/Microsoft.CLU.Test/TestCLU.bat renamed to src/CLU/Microsoft.ScenarioTests.CLU/testrunner.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
SETLOCAL EnableExtensions
22

33
ECHO Test return code success case
4-
call azure success show 2> out.error
4+
call testclu success show 2> out.error
55
REM We expect that the commands above succeed (return 0)
66
IF %ERRORLEVEL% NEQ 0 (
77
ECHO "Expected error level 0 for success, got " %ERRORLEVEL%
88
EXIT /B 1
99
)
1010

1111
ECHO Test return codes non terminating error case
12-
call azure success show --generatenonterminatingerror true 2> out.error
12+
call testclu success show --generatenonterminatingerror true 2> out.error
1313
IF %ERRORLEVEL% NEQ 1 (
1414
ECHO "Expected error level 1 for non-terminating error, got " %ERRORLEVEL%
1515
EXIT /B 1
1616
)
1717

1818
ECHO Test return codes terminating error case
19-
call azure success show --generateterminatingerror true 2> out.error
19+
call testclu success show --generateterminatingerror true 2> out.error
2020
IF %ERRORLEVEL% NEQ 2 (
2121
ECHO "Expected error level 2 for terminating error, got " %ERRORLEVEL%
2222
EXIT /B 1
2323
)
2424

2525
ECHO Test pipeline aliasing
26-
call azure test record new | azure test record show > out.txt
26+
call testclu record new | testclu record show > out.txt
2727
IF %ERRORLEVEL% NEQ 0 (
2828
ECHO "Expected error level 0 for success, got " %ERRORLEVEL%
2929
EXIT /B 1

tools/CLU/BuildPackage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $contentFileText = ""
3434
$contentFiles | %{ $contentFileText += (" <file src=""" + $_.Name + """ target=""content""/>`r`n")}
3535
if ($packageId -ne "Microsoft.CLU.Commands")
3636
{
37-
$contentFileText += " <file src=""content\azure.lx"" target=""content""/>`r`n"
37+
$contentFileText += " <file src=""content\*.lx"" target=""content""/>`r`n"
3838
}
3939
if ($renameFileExists)
4040
{

0 commit comments

Comments
 (0)