Compare commits
No commits in common. "ac0a195b5fa3a40eb66cef7b91a025fc6fcc3fea" and "88de476b1bc0e280e4b728c17d0466ffd5be01ac" have entirely different histories.
ac0a195b5f
...
88de476b1b
3 changed files with 5 additions and 30 deletions
1
test/data/test-isn/testcmd
Normal file
1
test/data/test-isn/testcmd
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
nuget install -NoCache -Verbosity detailed -ConfigFile ANuGet.Config Yavsc.Abstract
|
||||||
|
|
@ -9,6 +9,7 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
using isnd.Entities;
|
||||||
using Isn.Abstract;
|
using Isn.Abstract;
|
||||||
|
|
||||||
namespace Isn.tests
|
namespace Isn.tests
|
||||||
|
|
@ -207,7 +208,7 @@ namespace Isn.tests
|
||||||
public void TestPush()
|
public void TestPush()
|
||||||
{
|
{
|
||||||
Program.LoadConfig();
|
Program.LoadConfig();
|
||||||
var report = Program.PushPkg(new[] { GetDummyPackagePath() });
|
var report = Program.PushPkg(new[] { Path.Combine(AppContext.BaseDirectory, "dummy.nupkg") });
|
||||||
Assert.NotNull(report);
|
Assert.NotNull(report);
|
||||||
Assert.Single(report);
|
Assert.Single(report);
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +222,7 @@ namespace Isn.tests
|
||||||
Program.SaveConfig();
|
Program.SaveConfig();
|
||||||
Program.LoadConfig();
|
Program.LoadConfig();
|
||||||
|
|
||||||
var report = Program.PushPkg(new[] { GetDummyPackagePath() });
|
var report = Program.PushPkg(new[] { Path.Combine(AppContext.BaseDirectory, "dummy.nupkg") });
|
||||||
|
|
||||||
Assert.NotNull(report);
|
Assert.NotNull(report);
|
||||||
Assert.Single(report);
|
Assert.Single(report);
|
||||||
|
|
@ -237,33 +238,5 @@ namespace Isn.tests
|
||||||
var pub = model.Resources.FirstOrDefault(r => r.Type.StartsWith("PackagePublish/"));
|
var pub = model.Resources.FirstOrDefault(r => r.Type.StartsWith("PackagePublish/"));
|
||||||
Assert.True(pub != null);
|
Assert.True(pub != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetDummyPackagePath()
|
|
||||||
{
|
|
||||||
var localOutputDummy = Path.Combine(AppContext.BaseDirectory, "dummy.nupkg");
|
|
||||||
if (File.Exists(localOutputDummy))
|
|
||||||
{
|
|
||||||
return localOutputDummy;
|
|
||||||
}
|
|
||||||
|
|
||||||
var dir = new DirectoryInfo(AppContext.BaseDirectory);
|
|
||||||
while (dir != null)
|
|
||||||
{
|
|
||||||
if (File.Exists(Path.Combine(dir.FullName, "isn.sln")))
|
|
||||||
{
|
|
||||||
var sharedArtifact = Path.Combine(dir.FullName, "test", "data", "nuget-artifacts", "dummy.nuget.1.0.0.nupkg");
|
|
||||||
if (File.Exists(sharedArtifact))
|
|
||||||
{
|
|
||||||
return sharedArtifact;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = dir.Parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new FileNotFoundException("Unable to locate a dummy NuGet package for push tests.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,7 @@ using Microsoft.AspNetCore.DataProtection;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using NuGet.Common;
|
||||||
using NuGet.Configuration;
|
using NuGet.Configuration;
|
||||||
using NuGet.Protocol;
|
using NuGet.Protocol;
|
||||||
using NuGet.Protocol.Core.Types;
|
using NuGet.Protocol.Core.Types;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue