mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-28 07:27:18 +01:00
Hide and disable Sqlite support
This commit is contained in:
+3
-2
@@ -43,7 +43,8 @@ $HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Tests.dl
|
||||
#Run again for Sqlite
|
||||
export TGS4_TEST_DATABASE_TYPE=Sqlite
|
||||
export TGS4_TEST_CONNECTION_STRING="Data Source=TravisTestDB.sqlite3;Mode=ReadWriteCreate"
|
||||
$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/serversl.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*"
|
||||
#Disabled due to upstream issues
|
||||
#$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/serversl.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*"
|
||||
|
||||
cd ../../TestResults
|
||||
|
||||
@@ -53,4 +54,4 @@ bash <(curl -s https://codecov.io/bash) -f host.xml -F unittests
|
||||
bash <(curl -s https://codecov.io/bash) -f watchdog.xml -F unittests
|
||||
bash <(curl -s https://codecov.io/bash) -f console.xml -F unittests
|
||||
bash <(curl -s https://codecov.io/bash) -f servermy.xml -F integration
|
||||
bash <(curl -s https://codecov.io/bash) -f serversl.xml -F integration
|
||||
# bash <(curl -s https://codecov.io/bash) -f serversl.xml -F integration
|
||||
|
||||
@@ -285,8 +285,7 @@ namespace Tgstation.Server.Host.Core
|
||||
await console.WriteAsync(
|
||||
String.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"Please enter one of {0}, {1}, {2}, or {3}: ",
|
||||
DatabaseType.Sqlite,
|
||||
"Please enter one of {0}, {1}, or {2}: ",
|
||||
DatabaseType.MariaDB,
|
||||
DatabaseType.MySql,
|
||||
DatabaseType.SqlServer),
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Tgstation.Server.Host.Database
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task Initialize(CancellationToken cancellationToken)
|
||||
public virtual async Task Initialize(CancellationToken cancellationToken)
|
||||
{
|
||||
if (DatabaseConfiguration.DropDatabase)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Tgstation.Server.Host.Configuration;
|
||||
|
||||
namespace Tgstation.Server.Host.Database
|
||||
@@ -23,6 +26,9 @@ namespace Tgstation.Server.Host.Database
|
||||
public SqliteDatabaseContext(DbContextOptions<SqliteDatabaseContext> dbContextOptions, IOptions<DatabaseConfiguration> databaseConfiguration, IDatabaseSeeder databaseSeeder, ILogger<SqliteDatabaseContext> logger) : base(dbContextOptions, databaseConfiguration, databaseSeeder, logger)
|
||||
{ }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Task Initialize(CancellationToken cancellationToken) => throw new NotImplementedException("SQLite support currently is incomplete. See tracking issue at https://github.com/tgstation/tgstation-server/issues/885");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
{
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
},
|
||||
"Database": {
|
||||
"DropDatabase": false,
|
||||
"DatabaseType": "Sqlite",
|
||||
"DatabaseType": "SqlServer",
|
||||
"ResetAdminPassword": false,
|
||||
"MySqlServerVersion": null,
|
||||
"ConnectionString": "Data Source=LocalTestDB.sqlite3;Mode=ReadWriteCreate"
|
||||
"ConnectionString": "Data Source=(local);Initial Catalog=TGS;Integrated Security=True"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user