From 545f48ae7893d84bc5192039e5637b3345b8df63 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 12 May 2020 14:37:14 -0400 Subject: [PATCH] Test soft error in integration test --- tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs b/tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs index fcbe9ca146..e5c93cae75 100644 --- a/tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs +++ b/tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs @@ -9,6 +9,7 @@ using System.Net; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models; +using Tgstation.Server.Client; using Tgstation.Server.Client.Components; using Tgstation.Server.Host.Components.Interop; using Tgstation.Server.Host.System; @@ -34,6 +35,12 @@ namespace Tgstation.Server.Tests.Instance HeartbeatSeconds = 0, }, cancellationToken); + await ApiAssert.ThrowsException(() => instanceClient.DreamDaemon.Update(new DreamDaemon + { + SoftShutdown = true, + SoftRestart = true + }, cancellationToken), ErrorCode.DreamDaemonDoubleSoft); + await RunBasicTest(cancellationToken); await RunHeartbeatTest(cancellationToken);