Skip to content

Commit

Permalink
Remove failing and badly conceived test
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 21, 2023
1 parent 42b0937 commit 279671c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 86 deletions.
20 changes: 0 additions & 20 deletions tests/DMAPI/LongRunning/Test.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
66 changes: 0 additions & 66 deletions tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ await Task.WhenAll(

await RunLongRunningTestThenUpdate(cancellationToken);

await TestDDIsntResolvingSymlink(cancellationToken);

await RunLongRunningTestThenUpdateWithNewDme(cancellationToken);
await RunLongRunningTestThenUpdateWithByondVersionSwitch(cancellationToken);

Expand All @@ -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);
Expand Down

0 comments on commit 279671c

Please sign in to comment.