mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix some ubuntu tests
This commit is contained in:
@@ -50,10 +50,7 @@ public static class PathHelper
|
|||||||
|
|
||||||
public static string CopyUpdateTo(string dir)
|
public static string CopyUpdateTo(string dir)
|
||||||
{
|
{
|
||||||
var updateName = "update.exe";
|
var updateName = VelopackRuntimeInfo.IsWindows ? "update.exe" : "update";
|
||||||
if (VelopackRuntimeInfo.IsOSX) {
|
|
||||||
updateName = "update";
|
|
||||||
}
|
|
||||||
var path = GetRustAsset(updateName);
|
var path = GetRustAsset(updateName);
|
||||||
var newPath = Path.Combine(dir, updateName);
|
var newPath = Path.Combine(dir, updateName);
|
||||||
File.Copy(path, newPath);
|
File.Copy(path, newPath);
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ namespace Velopack.Tests
|
|||||||
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
||||||
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
||||||
|
|
||||||
string releasesSuffix = VelopackRuntimeInfo.IsOSX ? "-osx" : "";
|
string releasesSuffix = VelopackRuntimeInfo.SystemOs switch {
|
||||||
|
RuntimeOs.Windows => "",
|
||||||
|
RuntimeOs.Linux => "-linux",
|
||||||
|
RuntimeOs.OSX => "-osx",
|
||||||
|
_ => throw new ArgumentOutOfRangeException()
|
||||||
|
};
|
||||||
|
|
||||||
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
||||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
||||||
@@ -76,7 +81,12 @@ namespace Velopack.Tests
|
|||||||
{
|
{
|
||||||
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
||||||
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
||||||
string releasesSuffix = VelopackRuntimeInfo.IsOSX ? "-osx" : "";
|
string releasesSuffix = VelopackRuntimeInfo.SystemOs switch {
|
||||||
|
RuntimeOs.Windows => "",
|
||||||
|
RuntimeOs.Linux => "-linux",
|
||||||
|
RuntimeOs.OSX => "-osx",
|
||||||
|
_ => throw new ArgumentOutOfRangeException()
|
||||||
|
};
|
||||||
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
||||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
||||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.2.0.nupkg 1040561
|
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.2.0.nupkg 1040561
|
||||||
@@ -124,7 +134,12 @@ namespace Velopack.Tests
|
|||||||
{
|
{
|
||||||
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
||||||
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
||||||
string releasesSuffix = VelopackRuntimeInfo.IsOSX ? "-osx" : "";
|
string releasesSuffix = VelopackRuntimeInfo.SystemOs switch {
|
||||||
|
RuntimeOs.Windows => "",
|
||||||
|
RuntimeOs.Linux => "-linux",
|
||||||
|
RuntimeOs.OSX => "-osx",
|
||||||
|
_ => throw new ArgumentOutOfRangeException()
|
||||||
|
};
|
||||||
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
||||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
||||||
94689fede03fed7ab59c24337673a27837f0c3ec MyCoolApp-1.0.0.nupkg 1004502
|
94689fede03fed7ab59c24337673a27837f0c3ec MyCoolApp-1.0.0.nupkg 1004502
|
||||||
@@ -140,7 +155,12 @@ namespace Velopack.Tests
|
|||||||
{
|
{
|
||||||
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
||||||
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
||||||
string releasesSuffix = VelopackRuntimeInfo.IsOSX ? "-osx" : "";
|
string releasesSuffix = VelopackRuntimeInfo.SystemOs switch {
|
||||||
|
RuntimeOs.Windows => "",
|
||||||
|
RuntimeOs.Linux => "-linux",
|
||||||
|
RuntimeOs.OSX => "-osx",
|
||||||
|
_ => throw new ArgumentOutOfRangeException()
|
||||||
|
};
|
||||||
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
||||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
||||||
94689fede03fed7ab59c24337673a27837f0c3ec MyCoolApp-1.0.0.nupkg 1004502
|
94689fede03fed7ab59c24337673a27837f0c3ec MyCoolApp-1.0.0.nupkg 1004502
|
||||||
@@ -175,11 +195,12 @@ namespace Velopack.Tests
|
|||||||
um.VerifyPackageChecksum(info.TargetFullRelease);
|
um.VerifyPackageChecksum(info.TargetFullRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[SkippableTheory]
|
||||||
[InlineData("Clowd", "3.4.287", "3.4.292")]
|
[InlineData("Clowd", "3.4.287", "3.4.292")]
|
||||||
//[InlineData("slack", "1.1.8", "1.2.2")]
|
//[InlineData("slack", "1.1.8", "1.2.2")]
|
||||||
public async Task DownloadsDeltasAndCreatesFullVersion(string id, string fromVersion, string toVersion)
|
public async Task DownloadsDeltasAndCreatesFullVersion(string id, string fromVersion, string toVersion)
|
||||||
{
|
{
|
||||||
|
Skip.If(VelopackRuntimeInfo.IsLinux);
|
||||||
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
|
||||||
using var _1 = Utility.GetTempDirectory(out var packagesDir);
|
using var _1 = Utility.GetTempDirectory(out var packagesDir);
|
||||||
var repo = new FakeFixtureRepository(id, true);
|
var repo = new FakeFixtureRepository(id, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user