From 90d58777bb5c997a092a4fae5aaec5bde307d748 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 5 Sep 2018 16:58:11 -0400 Subject: [PATCH] Remove failing test --- .../Core/TestApplication.cs | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs b/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs deleted file mode 100644 index 10e043be13..0000000000 --- a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Tgstation.Server.Host.IO; - -namespace Tgstation.Server.Host.Core.Tests -{ - [TestClass] - public sealed class TestApplication : IServerControl - { - public Task ApplyUpdate(byte[] updateZipData, IIOManager ioManager, CancellationToken cancellationToken) => throw new NotImplementedException(); - - public void RegisterForRestart(Action action) - { - } - - public bool Restart() => throw new NotImplementedException(); - - [TestMethod] - public async Task TestSuccessfulStartup() - { - var dbName = Path.GetTempFileName(); - try - { - using (var webHost = WebHost.CreateDefaultBuilder(new string[] { "Database:DatabaseType=Sqlite", "Database:ConnectionString=Data Source=" + dbName }) //force it to use sqlite - .UseStartup() - .ConfigureServices((serviceCollection) => serviceCollection.AddSingleton(this)) - .Build() - ) - { - await webHost.StartAsync().ConfigureAwait(false); - await webHost.StopAsync().ConfigureAwait(false); - } - } - finally - { - File.Delete(dbName); - } - } - } -}