@@ -109,18 +109,36 @@ public void WhenRuntimeParametersArePassedToInstallScripts(string runtime, strin
109
109
// [InlineData("release/5.0", "dotnet")] - Broken
110
110
[ InlineData ( "Current" , "aspnetcore" ) ]
111
111
[ InlineData ( "LTS" , "aspnetcore" ) ]
112
+ //[InlineData("1.0", "aspnetcore")] - Broken
113
+ //[InlineData("1.1", "aspnetcore")] - Broken
114
+ //[InlineData("2.0", "aspnetcore")] - Broken
115
+ [ InlineData ( "2.2" , "aspnetcore" ) ]
116
+ [ InlineData ( "3.0" , "aspnetcore" ) ]
117
+ [ InlineData ( "3.1" , "aspnetcore" ) ]
118
+ [ InlineData ( "5.0" , "aspnetcore" ) ]
112
119
[ InlineData ( "master" , "aspnetcore" ) ]
113
120
[ InlineData ( "2.2" , "aspnetcore" ) ]
114
121
[ InlineData ( "3.0" , "aspnetcore" ) ]
115
122
[ InlineData ( "3.1" , "aspnetcore" ) ]
116
123
[ InlineData ( "5.0" , "aspnetcore" ) ]
117
124
[ InlineData ( "release/2.1" , "aspnetcore" ) ]
118
125
[ InlineData ( "release/2.2" , "aspnetcore" ) ]
119
- // [InlineData("release/3.0", "aspnetcore")] - Broken
120
- // [InlineData("release/3.1", "aspnetcore")] - Broken
121
- // [InlineData("release/5.0", "aspnetcore")] - Broken
126
+ //[InlineData("release/3.0", "aspnetcore")] - Broken
127
+ //[InlineData("release/3.1", "aspnetcore")] - Broken
128
+ //[InlineData("release/5.0", "aspnetcore")] - Broken
129
+ [ InlineData ( "Current" , "windowsdesktop" ) ]
130
+ [ InlineData ( "LTS" , "windowsdesktop" ) ]
131
+ [ InlineData ( "3.0" , "windowsdesktop" ) ]
132
+ [ InlineData ( "3.1" , "windowsdesktop" ) ]
133
+ [ InlineData ( "5.0" , "windowsdesktop" ) ]
134
+ [ InlineData ( "master" , "windowsdesktop" ) ]
122
135
public void WhenChannelResolvesToASpecificRuntimeVersion ( string channel , string runtimeType )
123
136
{
137
+ if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) && runtimeType == "windowsdesktop" )
138
+ {
139
+ //do not run windowsdesktop test on Linux environment
140
+ return ;
141
+ }
124
142
var args = new string [ ] { "-dryrun" , "-channel" , channel , "-runtime" , runtimeType } ;
125
143
126
144
var commandResult = CreateInstallCommand ( args )
@@ -193,6 +211,26 @@ public void WhenChannelResolvesToASpecificSDKVersion(string channel)
193
211
commandResult . Should ( ) . HaveStdOutContainingIgnoreCase ( "-version" ) ;
194
212
}
195
213
214
+ [ Theory ]
215
+ [ InlineData ( "5.0.1" , "WindowsDesktop" ) ]
216
+ [ InlineData ( "3.1.10" , "Runtime" ) ]
217
+ public void CanResolveCorrectLocationBasedOnVersion ( string version , string location )
218
+ {
219
+ if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
220
+ {
221
+ //do not run windowsdesktop test on Linux environment
222
+ return ;
223
+ }
224
+ string expectedLinkLog = $ "Constructed primary named payload URL: { Environment . NewLine } https://dotnetcli.azureedge.net/dotnet/{ location } /{ version } ";
225
+ var args = new string [ ] { "-version" , version , "-runtime" , "windowsdesktop" , "-verbose" , "-dryrun" } ;
226
+ var commandResult = CreateInstallCommand ( args )
227
+ . CaptureStdOut ( )
228
+ . CaptureStdErr ( )
229
+ . Execute ( ) ;
230
+
231
+ commandResult . Should ( ) . Pass ( ) . And . HaveStdOutContaining ( expectedLinkLog ) ;
232
+ }
233
+
196
234
private static Command CreateInstallCommand ( IEnumerable < string > args )
197
235
{
198
236
string path ;
0 commit comments