Skip to content

Commit 291141c

Browse files
authored
Merge pull request #59 from maraf/Net5FixTests
Fix unit tests after #58
2 parents 1132651 + 6b66179 commit 291141c

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ test_script:
5151
artifacts:
5252
- path: .\GitExtensions.PluginManager.*.zip
5353
- path: .\GitExtensions.PluginManager.*.nupkg
54+
- path: .\*.binlog
5455

5556
#---------------------------------#
5657
# deployment configuration #

src/PackageManager.NuGet/Models/NuGetPackageSourceCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public int MoveDown(IPackageSource source)
107107
{
108108
Sources.RemoveAt(index);
109109
Sources.Insert(++index, target);
110-
SavePackageSources();
110+
SavePackageSources(true);
111111
}
112112

113113
return index;

test/PackageManager.Tests/ViewModels/Commands/TestCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace PackageManager.ViewModels.Commands
1515
[TestClass]
1616
public class TestCommands
1717
{
18-
private const string ExtractPath = @"D:\";
18+
private const string ExtractPath = @".\";
1919

2020
[TestMethod]
2121
public void Install()

tools/Run-Tests.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Push-Location $PSScriptRoot;
22

3-
dotnet test ..\test\PackageManager.NuGet.Tests\PackageManager.NuGet.Tests.csproj -c Release --no-build --test-adapter-path:.. --logger:Appveyor /property:Platform=AnyCPU
4-
dotnet test ..\test\PackageManager.Tests\PackageManager.Tests.csproj -c Release --no-build --test-adapter-path:.. --logger:Appveyor /property:Platform=AnyCPU
3+
$targetPath = '..\';
4+
5+
$isAppveyor = $True -eq $env:APPVEYOR;
6+
7+
If (!$isAppveyor)
8+
{
9+
Write-Host "Running locally";
10+
11+
$targetPath = Join-Path $targetPath 'artifacts';
12+
}
13+
14+
dotnet test ..\test\PackageManager.NuGet.Tests\PackageManager.NuGet.Tests.csproj -c Release --test-adapter-path:.. --logger:Appveyor /property:Platform=AnyCPU -bl:$targetPath\build-PackageManager.NuGet.Tests.binlog
15+
dotnet test ..\test\PackageManager.Tests\PackageManager.Tests.csproj -c Release --test-adapter-path:.. --logger:Appveyor /property:Platform=AnyCPU -bl:$targetPath\build-PackageManager.Tests.binlog
516

617
Pop-Location;

0 commit comments

Comments
 (0)