|
14 | 14 | using NuGet.Test.Utility; |
15 | 15 | using Test.Utility; |
16 | 16 | using Xunit; |
17 | | -using Xunit.Abstractions; |
18 | 17 |
|
19 | 18 | namespace NuGet.CommandLine.FuncTest.Commands |
20 | 19 | { |
@@ -73,7 +72,7 @@ public void PushCommand_AllowsTimeoutToBeSpecifiedHigherThan100Seconds() |
73 | 72 | pathContext.WorkingDirectory, |
74 | 73 | $"push {sourcePath} -Source {server.Uri}push -Timeout 110", |
75 | 74 | timeOutInMilliseconds: 120 * 1000, |
76 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 75 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
77 | 76 | } |
78 | 77 | // Assert |
79 | 78 | Assert.True(result.Success, $"{result.Output} {result.Errors}"); |
@@ -117,7 +116,7 @@ public void PushCommand_AllowsTimeoutToBeSpecifiedLowerThan100Seconds() |
117 | 116 | pathContext.WorkingDirectory, |
118 | 117 | $"push {sourcePath} -Source {server.Uri}push -Timeout 1", |
119 | 118 | timeOutInMilliseconds: 20 * 1000, |
120 | | - testOutputHelper: _testOutputHelper); // 20 seconds |
| 119 | + logLine: _testOutputHelper.WriteLine); // 20 seconds |
121 | 120 | } |
122 | 121 |
|
123 | 122 | // Assert |
@@ -158,22 +157,22 @@ public void PushCommand_Server_SkipDuplicate_NotSpecified_PushHalts() |
158 | 157 | pathContext.WorkingDirectory, |
159 | 158 | $"push {sourcePath} -Source {server.Uri}push -Timeout 110", |
160 | 159 | timeOutInMilliseconds: 120 * 1000, |
161 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 160 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
162 | 161 |
|
163 | 162 | //Run again so that it will be a duplicate push. |
164 | 163 | result2 = CommandRunner.Run( |
165 | 164 | nuget, |
166 | 165 | pathContext.WorkingDirectory, |
167 | 166 | $"push {sourcePath} -Source {server.Uri}push -Timeout 110", |
168 | 167 | timeOutInMilliseconds: 120 * 1000, |
169 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 168 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
170 | 169 |
|
171 | 170 | result3 = CommandRunner.Run( |
172 | 171 | nuget, |
173 | 172 | pathContext.WorkingDirectory, |
174 | 173 | $"push {sourcePath2} -Source {server.Uri}push -Timeout 110", |
175 | 174 | timeOutInMilliseconds: 120 * 1000, |
176 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 175 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
177 | 176 | } |
178 | 177 |
|
179 | 178 | // Assert |
@@ -224,23 +223,23 @@ public void PushCommand_Server_SkipDuplicate_IsSpecified_PushProceeds() |
224 | 223 | pathContext.WorkingDirectory, |
225 | 224 | $"push {sourcePath} -Source {server.Uri}push -Timeout 110 -SkipDuplicate", |
226 | 225 | timeOutInMilliseconds: 120 * 1000, |
227 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 226 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
228 | 227 |
|
229 | 228 | //Run again so that it will be a duplicate push but use the option to skip duplicate packages. |
230 | 229 | result2 = CommandRunner.Run( |
231 | 230 | nuget, |
232 | 231 | pathContext.WorkingDirectory, |
233 | 232 | $"push {sourcePath} -Source {server.Uri}push -Timeout 110 -SkipDuplicate", |
234 | 233 | timeOutInMilliseconds: 120 * 1000, |
235 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 234 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
236 | 235 |
|
237 | 236 | //Third run with a different package. |
238 | 237 | result3 = CommandRunner.Run( |
239 | 238 | nuget, |
240 | 239 | pathContext.WorkingDirectory, |
241 | 240 | $"push {sourcePath2} -Source {server.Uri}push -Timeout 110 -SkipDuplicate", |
242 | 241 | timeOutInMilliseconds: 120 * 1000, |
243 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 242 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
244 | 243 | } |
245 | 244 |
|
246 | 245 | // Assert |
@@ -287,7 +286,7 @@ public void PushCommand_Server_Snupkg_ByFilename_DoesNotExist_FileNotFoundError( |
287 | 286 | pathContext.WorkingDirectory, |
288 | 287 | $"push {snupkgToPush} -Source {sourceName} -Timeout 110", |
289 | 288 | timeOutInMilliseconds: 120000, |
290 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 289 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
291 | 290 | } |
292 | 291 |
|
293 | 292 | // Assert |
@@ -324,7 +323,7 @@ public void PushCommand_Server_Snupkg_ByWildcard_FindsNothing_FileNotFoundError( |
324 | 323 | pathContext.WorkingDirectory, |
325 | 324 | $"push {snupkgToPush} -Source {sourceName} -Timeout 110", |
326 | 325 | timeOutInMilliseconds: 120000, |
327 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 326 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
328 | 327 | } |
329 | 328 |
|
330 | 329 | //Assert |
@@ -359,7 +358,7 @@ public void PushCommand_Server_Nupkg_ByFilename_FindsNothing_FileNotFoundError() |
359 | 358 | pathContext.WorkingDirectory, |
360 | 359 | $"push {nupkgToPush} -Source {sourceName} -Timeout 110", |
361 | 360 | timeOutInMilliseconds: 120000, |
362 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 361 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
363 | 362 | } |
364 | 363 |
|
365 | 364 | //Assert |
@@ -394,7 +393,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_FindsNothing_FileNotFoundError() |
394 | 393 | pathContext.WorkingDirectory, |
395 | 394 | $"push {nupkgToPush} -Source {sourceName} -Timeout 110", |
396 | 395 | timeOutInMilliseconds: 120000, |
397 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 396 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
398 | 397 | } |
399 | 398 |
|
400 | 399 | //Assert |
@@ -438,7 +437,7 @@ public void PushCommand_Server_Nupkg_ByFilename_SnupkgDoesNotExist_NoFileNotFoun |
438 | 437 | pathContext.WorkingDirectory, |
439 | 438 | $"push {nupkgFullPath} -Source {sourceName} -Timeout 110", |
440 | 439 | timeOutInMilliseconds: 120000, |
441 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 440 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
442 | 441 | } |
443 | 442 |
|
444 | 443 | // Assert |
@@ -479,7 +478,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_SnupkgDoesNotExist_NoFileNotFoun |
479 | 478 | pathContext.WorkingDirectory, |
480 | 479 | $"push {pushArgument} -Source {sourceName} -Timeout 110", |
481 | 480 | timeOutInMilliseconds: 120000, |
482 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 481 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
483 | 482 | } |
484 | 483 |
|
485 | 484 | // Assert |
@@ -531,15 +530,15 @@ public void PushCommand_Server_Nupkg_ByFilename_SnupkgExists_Conflict() |
531 | 530 | pathContext.WorkingDirectory, |
532 | 531 | $"push {nupkgFullPath} -Source {sourceName} -Timeout 110", |
533 | 532 | timeOutInMilliseconds: 120000, |
534 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 533 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
535 | 534 |
|
536 | 535 | //Second run with SkipDuplicate |
537 | 536 | result2 = CommandRunner.Run( |
538 | 537 | nuget, |
539 | 538 | pathContext.WorkingDirectory, |
540 | 539 | $"push {nupkgFullPath} -Source {sourceName} -Timeout 110 -SkipDuplicate", |
541 | 540 | timeOutInMilliseconds: 120000, |
542 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 541 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
543 | 542 | } |
544 | 543 |
|
545 | 544 | // Assert |
@@ -599,7 +598,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_NupkgAndSnupkgPushed() |
599 | 598 | pathContext.WorkingDirectory, |
600 | 599 | $"push {wildcardPush} -Source {sourceName} -Timeout 110", |
601 | 600 | timeOutInMilliseconds: 120000, |
602 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 601 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
603 | 602 | } |
604 | 603 |
|
605 | 604 | // Assert |
@@ -655,7 +654,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_SeparateSymbolUrl_NupkgAndSnupkg |
655 | 654 | pathContext.WorkingDirectory, |
656 | 655 | $"push {wildcardPush} -Source {sourceName} -SymbolSource {symbolSourceName} -Timeout 110", |
657 | 656 | timeOutInMilliseconds: 120000, |
658 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 657 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
659 | 658 | } |
660 | 659 |
|
661 | 660 | // Assert |
@@ -711,7 +710,7 @@ public void PushCommand_Server_Nupkg_SeparateSymbolUrl_NoSymbolTrue_SnupkgNotPus |
711 | 710 | pathContext.WorkingDirectory, |
712 | 711 | $"push {wildcardPush} -Source {sourceName} -SymbolSource {symbolPushUrl} -noSymbol -Timeout 110", |
713 | 712 | timeOutInMilliseconds: 120000, |
714 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 713 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
715 | 714 | } |
716 | 715 |
|
717 | 716 | // Assert |
@@ -766,7 +765,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_FindsMatchingSnupkgs_Conflict() |
766 | 765 | pathContext.WorkingDirectory, |
767 | 766 | $"push {wildcardPush} -Source {sourceName} -SymbolSource {sourceName} -Timeout 110", |
768 | 767 | timeOutInMilliseconds: 120000, |
769 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 768 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
770 | 769 | } |
771 | 770 |
|
772 | 771 | // Assert |
@@ -830,7 +829,7 @@ public void PushCommand_Server_Nupkg_ByWildcard_FindsMatchingSnupkgs_SkipDuplica |
830 | 829 | pathContext.WorkingDirectory, |
831 | 830 | $"push {wildcardPush} -Source {sourceName} -Timeout 110 -SkipDuplicate", |
832 | 831 | timeOutInMilliseconds: 120000, |
833 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 832 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
834 | 833 | } |
835 | 834 |
|
836 | 835 | // Assert |
@@ -890,7 +889,7 @@ public void PushCommand_Server_Snupkg_ByWildcard_FindsMatchingSnupkgs_Conflict() |
890 | 889 | pathContext.WorkingDirectory, |
891 | 890 | $"push {wildcardPush} -Source {sourceName} -Timeout 110", |
892 | 891 | timeOutInMilliseconds: 120000, |
893 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 892 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
894 | 893 | } |
895 | 894 |
|
896 | 895 | // Assert |
@@ -953,7 +952,7 @@ public void PushCommand_Server_Snupkg_ByWildcard_FindsMatchingSnupkgs_SkipDuplic |
953 | 952 | pathContext.WorkingDirectory, |
954 | 953 | $"push {wildcardPush} -Source {sourceName} -Timeout 110 -SkipDuplicate", |
955 | 954 | timeOutInMilliseconds: 120000, |
956 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 955 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
957 | 956 | } |
958 | 957 | // Assert |
959 | 958 |
|
@@ -1006,14 +1005,14 @@ public void PushCommand_Server_Snupkg_ByFilename_SnupkgExists_Conflict_ServerMes |
1006 | 1005 | pathContext.WorkingDirectory, |
1007 | 1006 | $"push {snupkgFileName} -Source {sourceName} -Timeout 110 -Verbosity detailed", |
1008 | 1007 | timeOutInMilliseconds: 120000, |
1009 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 1008 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
1010 | 1009 |
|
1011 | 1010 | result2 = CommandRunner.Run( |
1012 | 1011 | nuget, |
1013 | 1012 | pathContext.WorkingDirectory, |
1014 | 1013 | $"push {snupkgFileName} -Source {sourceName} -Timeout 110 -SkipDuplicate -Verbosity detailed", |
1015 | 1014 | timeOutInMilliseconds: 120000, |
1016 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 1015 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
1017 | 1016 | } |
1018 | 1017 |
|
1019 | 1018 | // Assert |
@@ -1045,7 +1044,7 @@ public void PushCommand_WhenPushingToAnHttpServerV3_WithSymbols_Errors() |
1045 | 1044 | packageDirectory, |
1046 | 1045 | $"push {snupkgFileName} -Source {sourceName} -Timeout 110 -Verbosity detailed", |
1047 | 1046 | timeOutInMilliseconds: 120000, |
1048 | | - testOutputHelper: _testOutputHelper); // 120 seconds |
| 1047 | + logLine: _testOutputHelper.WriteLine); // 120 seconds |
1049 | 1048 |
|
1050 | 1049 | // Assert |
1051 | 1050 | Assert.False(result.Success, result.AllOutput); |
|
0 commit comments