Disable Postgres for now

This commit is contained in:
Jordan Brown
2020-05-24 19:35:49 -04:00
parent 3ad18b2b07
commit 84a70dc49f
3 changed files with 29 additions and 23 deletions
+21 -21
View File
@@ -51,27 +51,27 @@ jobs:
packages:
- libc6-i386
- libstdc++6:i386
- env:
- DoxGeneration=false
- DockerBuild=false
- DMAPI=false
- CONFIG=Release
- TGS4_TEST_DATABASE_TYPE=PostgresSql
- TGS4_TEST_CONNECTION_STRING="Application Name=tgstation-server;Host=127.0.0.1;Username=postgres;Password=;Database=TGS_Test"
name: "PostgresSql Integration Test"
language: csharp
mono: none
dotnet: 3.1
services:
- postgresql
cache:
directories:
- $HOME/.nuget/packages:
addons:
apt:
packages:
- libc6-i386
- libstdc++6:i386
# - env:
# - DoxGeneration=false
# - DockerBuild=false
# - DMAPI=false
# - CONFIG=Release
# - TGS4_TEST_DATABASE_TYPE=PostgresSql
# - TGS4_TEST_CONNECTION_STRING="Application Name=tgstation-server;Host=127.0.0.1;Username=postgres;Password=;Database=TGS_Test"
# name: "PostgresSql Integration Test"
# language: csharp
# mono: none
# dotnet: 3.1
# services:
# - postgresql
# cache:
# directories:
# - $HOME/.nuget/packages:
# addons:
# apt:
# packages:
# - libc6-i386
# - libstdc++6:i386
- env:
- DoxGeneration=false
- DockerBuild=false
@@ -2,6 +2,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Diagnostics;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Database
@@ -36,6 +37,9 @@ namespace Tgstation.Server.Host.Database
/// <inheritdoc />
protected override void ValidateDatabaseType()
{
if (!Debugger.IsAttached)
throw new NotImplementedException("PostgresSQL implementation is not complete yet!");
if (DatabaseType != DatabaseType.PostgresSql)
throw new InvalidOperationException("Invalid DatabaseType for SqliteDatabaseContext!");
}
@@ -315,11 +315,13 @@ namespace Tgstation.Server.Host.Setup
await console.WriteAsync(
String.Format(
CultureInfo.InvariantCulture,
"Please enter one of {0}, {1}, {2}, {3}, or {4}: ",
"Please enter one of {0}, {1}, {2}, or {3}: ",
DatabaseType.MariaDB,
DatabaseType.MySql,
DatabaseType.PostgresSql,
#pragma warning disable SA1515 // Single-line comment should be preceded by blank line
// DatabaseType.PostgresSql,
DatabaseType.SqlServer,
#pragma warning restore SA1515 // Single-line comment should be preceded by blank line
DatabaseType.Sqlite),
false,
cancellationToken)