Add a test for creating instances in the installation directory

This commit is contained in:
Cyberboss
2018-10-23 16:29:21 -04:00
parent 9dea3ba088
commit 0c563d014c
@@ -51,6 +51,13 @@ namespace Tgstation.Server.Tests
}, cancellationToken)).ConfigureAwait(false);
await Assert.ThrowsExceptionAsync<ConflictException>(() => instanceManagerClient.CreateOrAttach(firstTest, cancellationToken)).ConfigureAwait(false);
//can't create instances in installation directory
await Assert.ThrowsExceptionAsync<ConflictException>(() => instanceManagerClient.CreateOrAttach(new Api.Models.Instance
{
Path = "./A/Local/Path",
Name = "NoInstallDirTest"
}, cancellationToken)).ConfigureAwait(false);
//can't move to existent directories
await Assert.ThrowsExceptionAsync<ConflictException>(() => instanceManagerClient.Update(new Api.Models.Instance
{