Cleanup in Identity tests
Fixes #10671 by using updated EF API Fixes #5812 so tests are re-enabled for PRs Also part of #10668 since one of the changed EF queries is now working Finally, I removed all remaining platform skips since with SQLite these tests should now run anywhere.
This commit is contained in:
parent
1ca61453c8
commit
a86a811f7b
|
|
@ -312,8 +312,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
// TODO: Fix once EF query works Issue #10668
|
||||
return (await UserClaims.Where(uc => uc.UserId.Equals(user.Id)).ToListAsync(cancellationToken)).Select(c => c.ToClaim()).ToList();
|
||||
return await UserClaims.Where(uc => uc.UserId.Equals(user.Id)).Select(c => c.ToClaim()).ToListAsync(cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -445,8 +445,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
// TODO: Fix once EF query works Issue #10668
|
||||
return (await UserClaims.Where(uc => uc.UserId.Equals(user.Id)).ToListAsync(cancellationToken)).Select(c => c.ToClaim()).ToList();
|
||||
return await UserClaims.Where(uc => uc.UserId.Equals(user.Id)).Select(c => c.ToClaim()).ToListAsync(cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanUpdateNameGuid()
|
||||
{
|
||||
using (var db = new CustomDbContext<Guid>(
|
||||
|
|
@ -54,9 +51,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanUpdateNameString()
|
||||
{
|
||||
using (var db = new CustomDbContext<string>(
|
||||
|
|
@ -79,9 +73,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanCreateUserInt()
|
||||
{
|
||||
using (var db = new CustomDbContext<int>(
|
||||
|
|
@ -102,9 +93,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanCreateUserIntViaSet()
|
||||
{
|
||||
using (var db = new CustomDbContext<int>(
|
||||
|
|
@ -126,9 +114,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanUpdateNameInt()
|
||||
{
|
||||
using (var db = new CustomDbContext<int>(
|
||||
|
|
@ -151,9 +136,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanUpdateNameIntWithSet()
|
||||
{
|
||||
using (var db = new CustomDbContext<int>(
|
||||
|
|
|
|||
|
|
@ -44,11 +44,9 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
{
|
||||
var count = 0;
|
||||
|
||||
// TODO: Use new API once EF is updated. Issue #10671
|
||||
foreach (var property in context.Model.GetEntityTypes().Single(e => (string)e.FindAnnotation("Relational:TableName")?.Value == table).GetProperties())
|
||||
foreach (var property in context.Model.GetEntityTypes().Single(e => e.GetTableName() == table).GetProperties())
|
||||
{
|
||||
// TODO: Use new API once EF is updated. Issue #10671
|
||||
if (!columns.Contains((string)property.FindAnnotation("Relational:ColumnName")?.Value ?? property.Name))
|
||||
if (!columns.Contains(property.GetColumnName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
public class DefaultPocoTest : IClassFixture<ScratchDatabaseFixture>
|
||||
{
|
||||
private readonly ApplicationBuilder _builder;
|
||||
private const string DatabaseName = nameof(DefaultPocoTest);
|
||||
|
||||
public DefaultPocoTest(ScratchDatabaseFixture fixture)
|
||||
{
|
||||
|
|
@ -42,9 +41,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task EnsureStartupUsageWorks()
|
||||
{
|
||||
var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
public class MaxKeyLengthSchemaTest : IClassFixture<ScratchDatabaseFixture>
|
||||
{
|
||||
private readonly ApplicationBuilder _builder;
|
||||
private const string DatabaseName = nameof(MaxKeyLengthSchemaTest);
|
||||
|
||||
public MaxKeyLengthSchemaTest(ScratchDatabaseFixture fixture)
|
||||
{
|
||||
|
|
@ -49,9 +48,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void EnsureDefaultSchema()
|
||||
{
|
||||
using (var scope = _builder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope())
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
|
||||
<!-- These tests are broken in Azure Pipelines right now due to deadlocks in EFCore on machines with few CPU cores. -->
|
||||
<SkipTests Condition=" '$(BUILD_REASON)' == 'PullRequest' ">true</SkipTests>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity.Test;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
@ -73,9 +71,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void EnsureDefaultSchema()
|
||||
{
|
||||
VerifyDefaultSchema(CreateContext());
|
||||
|
|
@ -107,9 +102,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteUserRemovesTokensTest()
|
||||
{
|
||||
// Need fail if not empty?
|
||||
|
|
@ -127,9 +119,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void CanCreateUserUsingEF()
|
||||
{
|
||||
using (var db = CreateContext())
|
||||
|
|
@ -143,9 +132,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanCreateUsingManager()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -172,9 +158,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByIdTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -191,9 +174,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByNameTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -209,9 +189,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByLoginTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -227,9 +204,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByEmailTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity.Test;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
@ -120,9 +118,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void EnsureDefaultSchema()
|
||||
{
|
||||
VerifyDefaultSchema(CreateContext());
|
||||
|
|
@ -155,9 +150,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteRoleNonEmptySucceedsTest()
|
||||
{
|
||||
// Need fail if not empty?
|
||||
|
|
@ -183,9 +175,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteUserRemovesFromRoleTest()
|
||||
{
|
||||
// Need fail if not empty?
|
||||
|
|
@ -209,9 +198,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteUserRemovesTokensTest()
|
||||
{
|
||||
// Need fail if not empty?
|
||||
|
|
@ -229,9 +215,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void CanCreateUserUsingEF()
|
||||
{
|
||||
using (var db = CreateContext())
|
||||
|
|
@ -245,9 +228,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanCreateUsingManager()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -281,9 +261,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByIdTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -300,9 +277,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByNameTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -318,9 +292,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByLoginTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
@ -336,9 +307,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task GetSecurityStampThrowsIfNull()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -350,9 +318,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task LoadFromDbFindByEmailTest()
|
||||
{
|
||||
var db = CreateContext();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
public class UserOnlyCustomContextTest : IClassFixture<ScratchDatabaseFixture>
|
||||
{
|
||||
private readonly ApplicationBuilder _builder;
|
||||
private const string DatabaseName = nameof(UserOnlyCustomContextTest);
|
||||
|
||||
public class CustomContext : DbContext
|
||||
{
|
||||
|
|
@ -87,9 +86,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task EnsureStartupUsageWorks()
|
||||
{
|
||||
var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
public class UserOnlyTest : IClassFixture<ScratchDatabaseFixture>
|
||||
{
|
||||
private readonly ApplicationBuilder _builder;
|
||||
private const string DatabaseName = nameof(UserOnlyTest);
|
||||
|
||||
public class TestUserDbContext : IdentityUserContext<IdentityUser>
|
||||
{
|
||||
|
|
@ -49,9 +48,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task EnsureStartupUsageWorks()
|
||||
{
|
||||
var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>();
|
||||
|
|
@ -68,9 +64,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task FindByEmailThrowsWithTwoUsersWithSameEmail()
|
||||
{
|
||||
var userStore = _builder.ApplicationServices.GetRequiredService<IUserStore<IdentityUser>>();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using System.Linq.Expressions;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity.Test;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Xunit;
|
||||
|
|
@ -30,9 +29,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void CanCreateUserUsingEF()
|
||||
{
|
||||
using (var db = CreateContext())
|
||||
|
|
@ -167,9 +163,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task CanCreateUsingManager()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -180,9 +173,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task TwoUsersSamePasswordDifferentHash()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -195,9 +185,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task FindByEmailThrowsWithTwoUsersWithSameEmail()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -212,9 +199,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task AddUserToUnknownRoleFails()
|
||||
{
|
||||
var manager = CreateManager();
|
||||
|
|
@ -225,9 +209,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task ConcurrentUpdatesWillFail()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
@ -259,9 +240,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task ConcurrentUpdatesWillFailWithDetachedUser()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
@ -291,9 +269,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteAModifiedUserWillFail()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
@ -324,9 +299,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task ConcurrentRoleUpdatesWillFail()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
@ -358,9 +330,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task ConcurrentRoleUpdatesWillFailWithDetachedRole()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
@ -391,9 +360,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task DeleteAModifiedRoleWillFail()
|
||||
{
|
||||
var options = new DbContextOptionsBuilder().UseSqlite($"Data Source=D{Guid.NewGuid()}.db").Options;
|
||||
|
|
|
|||
|
|
@ -979,7 +979,6 @@ namespace Microsoft.AspNetCore.Identity.Test
|
|||
[Fact]
|
||||
public async Task PasswordValidatorBlocksCreate()
|
||||
{
|
||||
// TODO: Can switch to Mock eventually
|
||||
var manager = MockHelpers.TestUserManager(new EmptyStore());
|
||||
manager.PasswordValidators.Clear();
|
||||
manager.PasswordValidators.Add(new BadPasswordValidator<PocoUser>(true));
|
||||
|
|
@ -990,7 +989,6 @@ namespace Microsoft.AspNetCore.Identity.Test
|
|||
[Fact]
|
||||
public async Task PasswordValidatorWithoutErrorsBlocksCreate()
|
||||
{
|
||||
// TODO: Can switch to Mock eventually
|
||||
var manager = MockHelpers.TestUserManager(new EmptyStore());
|
||||
manager.PasswordValidators.Clear();
|
||||
manager.PasswordValidators.Add(new BadPasswordValidator<PocoUser>());
|
||||
|
|
|
|||
Loading…
Reference in New Issue