From 279671c7cbd8d2e5ea184e2461c42af14b2b11df Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 21 Oct 2023 03:49:28 -0400 Subject: [PATCH] Remove failing and badly conceived test --- tests/DMAPI/LongRunning/Test.dm | 20 ------ .../Live/Instance/WatchdogTest.cs | 66 ------------------- 2 files changed, 86 deletions(-) diff --git a/tests/DMAPI/LongRunning/Test.dm b/tests/DMAPI/LongRunning/Test.dm index d3515034ee8..a77c3377b5d 100644 --- a/tests/DMAPI/LongRunning/Test.dm +++ b/tests/DMAPI/LongRunning/Test.dm @@ -146,26 +146,6 @@ var/run_bridge_test kajigger_test = TRUE return "we love casting spells" - var/expected_path = data["vaporeon"] - if(expected_path) - var/command - if(world.system_type == MS_WINDOWS) - command = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -Command \"if('[expected_path]' -ne $(Get-Location)){ (Get-Location).Path | Out-File \"fuck_up.txt\"; exit 1; }\"" - else - command = "if \[\[ \"[expected_path]\" != \"$(pwd)\" \]\]; then echo $(pwd) > fuck_up.txt; exit 1; fi" - - world.log << "shell: [command]" - var/exitCode = shell(command) - - if(isnull(exitCode) || exitCode != 0) - var/fuck_up_reason = "DIDN'T READ" - if(fexists("fuck_up.txt")) - fuck_up_reason = "COULDN'T READ" - fuck_up_reason = file2text("fuck_up.txt") - return "Dir check shell command failed with code [exitCode || "null"]: [fuck_up_reason]" - - return "is the most pokemon of all time" - TgsChatBroadcast(new /datum/tgs_message_content("Recieved non-tgs topic: `[T]`")) return "feck" diff --git a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs index bd1671e05e8..329fab6aa19 100644 --- a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs @@ -131,8 +131,6 @@ await Task.WhenAll( await RunLongRunningTestThenUpdate(cancellationToken); - await TestDDIsntResolvingSymlink(cancellationToken); - await RunLongRunningTestThenUpdateWithNewDme(cancellationToken); await RunLongRunningTestThenUpdateWithByondVersionSwitch(cancellationToken); @@ -152,70 +150,6 @@ await instanceClient.DreamDaemon.Update(new DreamDaemonRequest System.Console.WriteLine($"TEST: END WATCHDOG TESTS {instanceClient.Metadata.Name}"); } - async ValueTask TestDDIsntResolvingSymlink(CancellationToken cancellationToken) - { - System.Console.WriteLine("STARTING SYMLINK RESOLVE TEST"); - var deployTask = DeployTestDme("long_running_test_rooted", DreamDaemonSecurity.Trusted, true, cancellationToken); - - var previous = await instanceClient.DreamDaemon.Read(cancellationToken); - if (previous.SecurityLevel.Value != DreamDaemonSecurity.Trusted) - { - var updated = await instanceClient.DreamDaemon.Update(new DreamDaemonRequest - { - SecurityLevel = DreamDaemonSecurity.Trusted - }, cancellationToken); - - Assert.AreEqual(DreamDaemonSecurity.Trusted, updated.SecurityLevel); - } - - var startState = await deployTask; - - await WaitForJob(await StartDD(cancellationToken), 30, false, null, cancellationToken); - - var command = topicClient.SanitizeString( - Path.GetFullPath( - Path.Combine( - instanceClient.Metadata.Path, - "Game", - "Live"))); - command = $"vaporeon={command}"; - - var topicRequestResult = await topicClient.SendTopic( - IPAddress.Loopback, - command, - ddPort, - cancellationToken); - - Assert.IsNotNull(topicRequestResult); - Assert.AreEqual("is the most pokemon of all time", topicRequestResult.StringData); - - await DeployTestDme("long_running_test_rooted", DreamDaemonSecurity.Trusted, true, cancellationToken); - var newState = await TellWorldToReboot(cancellationToken); - - Assert.AreNotEqual(startState.ActiveCompileJob.Id, newState.ActiveCompileJob.Id); - topicRequestResult = await topicClient.SendTopic( - IPAddress.Loopback, - command, - ddPort, - cancellationToken); - - Assert.IsNotNull(topicRequestResult); - Assert.AreEqual("is the most pokemon of all time", topicRequestResult.StringData); - - await instanceClient.DreamDaemon.Shutdown(cancellationToken); - if (previous.SecurityLevel.Value != DreamDaemonSecurity.Trusted) - { - var updated = await instanceClient.DreamDaemon.Update(new DreamDaemonRequest - { - SecurityLevel = previous.SecurityLevel - }, cancellationToken); - - Assert.AreEqual(previous.SecurityLevel, updated.SecurityLevel); - } - - System.Console.WriteLine("END SYMLINK RESOLVE TEST"); - } - async Task InteropTestsForLongRunningDme(CancellationToken cancellationToken) { await StartAndLeaveRunning(cancellationToken);