Use in memory store for non-windows tests and disable tests until new cli is available
This commit is contained in:
parent
a3975422ec
commit
6af8da4713
|
|
@ -42,11 +42,8 @@ namespace MusicStore
|
|||
{
|
||||
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
|
||||
|
||||
//Sql client not available on mono
|
||||
var useInMemoryStore = _platform.IsRunningOnMono;
|
||||
|
||||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
|
|
|
|||
|
|
@ -47,13 +47,8 @@ namespace MusicStore
|
|||
{
|
||||
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
|
||||
|
||||
//Sql client not available on mono
|
||||
var useInMemoryStore = !_platform.IsRunningOnWindows
|
||||
|| _platform.IsRunningOnMono
|
||||
|| _platform.IsRunningOnNanoServer;
|
||||
|
||||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
|
|
|
|||
|
|
@ -86,5 +86,14 @@ namespace MusicStore
|
|||
return _isNano.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Sql client not available on mono, non-windows, or nano
|
||||
public bool UseInMemoryStore
|
||||
{
|
||||
get
|
||||
{
|
||||
return !IsRunningOnWindows || IsRunningOnMono || IsRunningOnNanoServer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,12 +36,9 @@ namespace MusicStore
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
|
||||
var useInMemoryStore = !_platform.IsRunningOnWindows
|
||||
|| _platform.IsRunningOnMono
|
||||
|| _platform.IsRunningOnNanoServer;
|
||||
|
||||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
|
|
|
|||
|
|
@ -53,10 +53,8 @@ namespace MusicStore
|
|||
{
|
||||
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
|
||||
|
||||
var useInMemoryStore = _platform.IsRunningOnMono || _platform.IsRunningOnNanoServer;
|
||||
|
||||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace E2ETests
|
|||
await OpenIdConnectTestSuite(serverType, runtimeFlavor, architecture, applicationType, applicationBaseUrl);
|
||||
}
|
||||
|
||||
[ConditionalTheory, Trait("E2Etests", "E2Etests")]
|
||||
[ConditionalTheory(Skip = "Need to wait for a new cli with rc3 packages"), Trait("E2Etests", "E2Etests")]
|
||||
[OSSkipCondition(OperatingSystems.Windows)]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, "http://localhost:5043/")]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, "http://localhost:5044/")]
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace E2ETests
|
|||
await smokeTestRunner.SmokeTestSuite(serverType, runtimeFlavor, architecture, applicationType, applicationBaseUrl);
|
||||
}
|
||||
|
||||
[ConditionalTheory, Trait("E2Etests", "Smoke")]
|
||||
[ConditionalTheory(Skip = "Need to wait for a new cli with rc3 packages"), Trait("E2Etests", "Smoke")]
|
||||
[OSSkipCondition(OperatingSystems.Windows)]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, "http://localhost:5020/")]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, "http://localhost:5021/")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue