Compare commits
2 commits
88de476b1b
...
ac0a195b5f
| Author | SHA1 | Date | |
|---|---|---|---|
| ac0a195b5f | |||
| 934435d1fd |
3 changed files with 30 additions and 5 deletions
|
|
@ -1 +0,0 @@
|
||||||
nuget install -NoCache -Verbosity detailed -ConfigFile ANuGet.Config Yavsc.Abstract
|
|
||||||
|
|
@ -9,7 +9,6 @@ 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
|
||||||
|
|
@ -208,7 +207,7 @@ namespace Isn.tests
|
||||||
public void TestPush()
|
public void TestPush()
|
||||||
{
|
{
|
||||||
Program.LoadConfig();
|
Program.LoadConfig();
|
||||||
var report = Program.PushPkg(new[] { Path.Combine(AppContext.BaseDirectory, "dummy.nupkg") });
|
var report = Program.PushPkg(new[] { GetDummyPackagePath() });
|
||||||
Assert.NotNull(report);
|
Assert.NotNull(report);
|
||||||
Assert.Single(report);
|
Assert.Single(report);
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +221,7 @@ namespace Isn.tests
|
||||||
Program.SaveConfig();
|
Program.SaveConfig();
|
||||||
Program.LoadConfig();
|
Program.LoadConfig();
|
||||||
|
|
||||||
var report = Program.PushPkg(new[] { Path.Combine(AppContext.BaseDirectory, "dummy.nupkg") });
|
var report = Program.PushPkg(new[] { GetDummyPackagePath() });
|
||||||
|
|
||||||
Assert.NotNull(report);
|
Assert.NotNull(report);
|
||||||
Assert.Single(report);
|
Assert.Single(report);
|
||||||
|
|
@ -238,5 +237,33 @@ 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,7 +17,6 @@ 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