From 0c563d014cdf68eaecbcb739a7ccd883bfdfb3a3 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Tue, 23 Oct 2018 16:29:21 -0400 Subject: [PATCH] Add a test for creating instances in the installation directory --- tests/Tgstation.Server.Tests/InstanceManagerTest.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Tgstation.Server.Tests/InstanceManagerTest.cs b/tests/Tgstation.Server.Tests/InstanceManagerTest.cs index 0c9efe68b9..6a09d73d63 100644 --- a/tests/Tgstation.Server.Tests/InstanceManagerTest.cs +++ b/tests/Tgstation.Server.Tests/InstanceManagerTest.cs @@ -51,6 +51,13 @@ namespace Tgstation.Server.Tests }, cancellationToken)).ConfigureAwait(false); await Assert.ThrowsExceptionAsync(() => instanceManagerClient.CreateOrAttach(firstTest, cancellationToken)).ConfigureAwait(false); + //can't create instances in installation directory + await Assert.ThrowsExceptionAsync(() => instanceManagerClient.CreateOrAttach(new Api.Models.Instance + { + Path = "./A/Local/Path", + Name = "NoInstallDirTest" + }, cancellationToken)).ConfigureAwait(false); + //can't move to existent directories await Assert.ThrowsExceptionAsync(() => instanceManagerClient.Update(new Api.Models.Instance {