vnext
Paul Schneider 4 years ago
parent dd0414bcd8
commit 66616e7314
11 changed files with 53 additions and 36 deletions

@ -1,10 +1,12 @@
CONFIGURATION=Debug
BINTARGET=bin/$(CONFIGURATION)/dnx451/test.dll
SOURCE_DIR=$(HOME)/workspace/yavsc
MAKEFILE_DIR=$(SOURCE_DIR)/scripts/make
MSBUILD=msbuild
all: test
project.lock.json: project.json
dnu restore --ignore-failed-sources
include $(MAKEFILE_DIR)/dnx.mk
../Yavsc/bin/$(CONFIGURATION)/dnx451/Yavsc.dll:
make -C ../Yavsc
@ -18,23 +20,21 @@ project.lock.json: project.json
$(BINTARGET): project.lock.json ../Yavsc/bin/$(CONFIGURATION)/dnx451/Yavsc.dll ../Yavsc.Abstract/bin/$(CONFIGURATION)/dnx451/Yavsc.Abstract.dll ../Yavsc.Server/bin/$(CONFIGURATION)/dnx451/Yavsc.Server.dll
dnu build --configuration $(CONFIGURATION)
breaking:
dnx test -trait regres=yes
non-regression: $(BINTARGET) node_modules/ansi-to-html
ASPNET_ENV=Development dnx test -maxthreads 1 -trait regression=non
testdev: $(BINTARGET)
regression: $(BINTARGET) node_modules/ansi-to-html
ASPNET_ENV=Development dnx test -maxthreads 1 -trait regression=oui
test: non-regression
testdev: $(BINTARGET)
ASPNET_ENV=Development dnx test -maxthreads 1 -trait dev=wip
node_modules/ansi-to-html:
npm install ansi-to-html
test: $(BINTARGET) node_modules/ansi-to-html
ASPNET_ENV=Development dnx test -maxthreads 1 -trait regres=no
restore:
dnu restore --ignore-failed-sources
clean:
rm -rf bin obj testingrepo
.PHONY: test

@ -25,10 +25,8 @@ using Yavsc.Server.Models.IT.SourceCode;
namespace test
{
[Collection("Yavsc mandatory success story")]
[Trait("regres", "yes")]
[Trait("regression", "oui")]
public class BatchTests: BaseTestContext, IClassFixture<ServerSideFixture>, IDisposable
{
ServerSideFixture _fixture;

@ -22,7 +22,7 @@ using Microsoft.AspNet.Mvc.Razor;
namespace test
{
[Collection("Yavsc Work In Progress")]
[Trait("regres", "yes")]
[Trait("regression", "oui")]
[Trait("module", "api")]
public class RegiserAPI : BaseTestContext, IClassFixture<ServerSideFixture>
{

@ -19,7 +19,7 @@ using static OAuth.AspNet.AuthServer.Constants;
namespace test
{
[Collection("Yavsc Work In Progress")]
[Trait("regres", "yes")]
[Trait("regression", "oui")]
public class Remoting : BaseTestContext, IClassFixture<ServerSideFixture>
{
RegiserAPI r;

@ -2,7 +2,6 @@
namespace test {
public class ResxResources {
const string resPath = "Resources/Test.TestResources.resx";
public void HaveAResxLoader()
{
System.Resources.ResourceReader loader = new System.Resources.ResourceReader(resPath);
@ -20,4 +19,4 @@ namespace test {
}
}
}
}

@ -6,7 +6,7 @@ using Yavsc.Helpers;
namespace test
{
[Collection("Yavsc Abstract tests")]
[Trait("regres", "no")]
[Trait("regression", "non")]
public class AbstractTests
{
readonly ITestOutputHelper output;

@ -5,7 +5,7 @@ using Xunit.Abstractions;
namespace test.Mandatory
{
[Collection("Database")]
[Trait("regres", "no")]
[Trait("regression", "non")]
[Trait("dev", "wip")]
public class Database: IClassFixture<ServerSideFixture>, IDisposable
{

@ -7,7 +7,7 @@ namespace test
{
[Collection("EMaillingTeststCollection")]
[Trait("regres", "no")]
[Trait("regression", "non")]
public class EMaillingTests : IClassFixture<ServerSideFixture>
{

@ -6,7 +6,7 @@ using System.Diagnostics;
namespace test
{
[Trait("regres", "no")]
[Trait("regression", "non")]
public class NodeTests
{
[Fact]

@ -333,7 +333,6 @@ namespace test
ApplicationUser user = null;
user = DbContext.Users.Include(u => u.Membership).First(u => u.UserName == context.UserName);
#if USERMANAGER
if (await _usermanager.CheckPasswordAsync(user, context.Password))
{
@ -359,6 +358,7 @@ namespace test
context.HttpContext.User = principal;
context.Validated(principal);
}
#if USERMANAGER
#endif
return Task.FromResult(0);
}
@ -413,16 +413,17 @@ namespace test
#endregion
#if USERMANAGER
_usermanager = usermanager;
#endif
UserManager<ApplicationUser> _usermanager;
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env,
ApplicationDbContext dbContext,
IOptions<Testing> testingSettings,
ILoggerFactory loggerFactory)
UserManager<ApplicationUser> usermanager,
ILoggerFactory loggerFactory
)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
@ -430,6 +431,11 @@ namespace test
logger.LogInformation(env.EnvironmentName);
this.DbContext = dbContext;
Testing = testingSettings.Value;
_usermanager = usermanager;
#if USERMANAGER
#endif
if (Testing.ConnectionStrings == null)
logger.LogInformation($" Testing.ConnectionStrings is null : ");
else

@ -5,6 +5,28 @@
"authors": [
"Paul Schneider <paul@pschneider.fr>"
],
"resource": "Resources/**/*.resx",
"buildOptions": {
"debugType": "full",
"emitEntryPoint": true,
"compile": {
"include": "*.cs",
"exclude": [
"contrib"
]
},
"embed": [
"Resources/**/*.resx"
],
"define": ["USERMANAGER"]
},
"frameworks": {
"dnx451": {}
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls https://*:5001",
"test": "xunit.runner.dnx"
},
"packOptions": {
"repository": {
"type": "git",
@ -18,7 +40,6 @@
"summary": "Yet another very small company",
"projectUrl": "http://yavsc.pschneider.fr",
"tags": [
"Blog",
"Blog",
"PoS",
"Chat"
@ -64,13 +85,6 @@
"type": "build"
}
},
"frameworks": {
"dnx451": {}
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls https://*:5001",
"test": "xunit.runner.dnx"
},
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f",
"scripts": {
"postrestore": [

Loading…