Skip to content

Commit

Permalink
Merge branch 'V6' into OpenDream
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 21, 2023
2 parents 96222d8 + 471856c commit 84a7d00
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<TgsCoreVersion>6.0.0</TgsCoreVersion>
<TgsConfigVersion>5.0.0</TgsConfigVersion>
<TgsApiVersion>9.13.0</TgsApiVersion>
<TgsCommonLibraryVersion>6.0.1</TgsCommonLibraryVersion>
<TgsCommonLibraryVersion>7.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>12.0.0</TgsApiLibraryVersion>
<TgsClientVersion>13.0.0</TgsClientVersion>
<TgsClientVersion>14.0.0</TgsClientVersion>
<TgsDmapiVersion>7.0.0</TgsDmapiVersion>
<TgsInteropVersion>5.7.0</TgsInteropVersion>
<TgsHostWatchdogVersion>1.4.0</TgsHostWatchdogVersion>
Expand Down
1 change: 1 addition & 0 deletions src/Tgstation.Server.Client/Tgstation.Server.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<ItemGroup>
<ProjectReference Include="..\Tgstation.Server.Api\Tgstation.Server.Api.csproj" />
<ProjectReference Include="..\Tgstation.Server.Common\Tgstation.Server.Common.csproj" /> <!-- Needed for explicit nuget versioning -->
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ await instanceClient.DreamDaemon.Update(new DreamDaemonRequest

await Task.WhenAny(ourProcessHandler.Lifetime, Task.Delay(TimeSpan.FromMinutes(1), cancellationToken));

var timeout = 20;
var timeout = 60;
DreamDaemonResponse ddStatus;
do
{
Expand Down
217 changes: 214 additions & 3 deletions tests/Tgstation.Server.Tests/Live/TestLiveServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Net.Mime;
using System.Net.Sockets;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

Expand Down Expand Up @@ -989,6 +990,216 @@ await Task.WhenAny(
new LiveTestingServer(null, false).Dispose();
}

[TestMethod]
public async Task TestTgstationInteractive() => await TestTgstation(true);

[TestMethod]
public async Task TestTgstationHeadless() => await TestTgstation(false);

async ValueTask TestTgstation(bool interactive)
{
// i'm only running this on dev machines, actions is too taxed
if (TestingUtils.RunningInGitHubActions)
Assert.Inconclusive("lol. lmao.");

var discordConnectionString = Environment.GetEnvironmentVariable("TGS_TEST_DISCORD_TOKEN");

var procs = System.Diagnostics.Process.GetProcessesByName("byond");
if (procs.Any())
{
foreach (var proc in procs)
proc.Dispose();

// Inconclusive and not fail because we don't want to unexpectedly kill a dev's BYOND.exe
Assert.Inconclusive("Cannot run server test because DreamDaemon will not start headless while the BYOND pager is running!");
}


using var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddConsole();
builder.SetMinimumLevel(LogLevel.Trace);
});
using var server = new LiveTestingServer(null, true);

TerminateAllDDs();

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

Check failure on line 1025 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

The name 'TerminateAllDDs' does not exist in the current context

using var serverCts = new CancellationTokenSource();
var cancellationToken = serverCts.Token;
var serverTask = server.Run(cancellationToken);
try
{
using var adminClient = await CreateAdminClient(server.Url, cancellationToken);

var instanceManagerTest = new InstanceManagerTest(adminClient, server.Directory);
var instance = await instanceManagerTest.CreateTestInstance("TgTestInstance", cancellationToken);
var instanceClient = adminClient.Instances.CreateClient(instance);


var ddUpdateTask = instanceClient.DreamDaemon.Update(new DreamDaemonRequest
{
LogOutput = true,
}, cancellationToken);
var dmUpdateTask = instanceClient.DreamMaker.Update(new DreamMakerRequest
{
ApiValidationSecurityLevel = DreamDaemonSecurity.Trusted,
}, cancellationToken);

var ioManager = new Host.IO.DefaultIOManager();
var repoPath = ioManager.ConcatPath(instance.Path, "Repository");
var jobsTest = new JobsRequiredTest(instanceClient.Jobs);
var postWriteHandler = (Host.IO.IPostWriteHandler)(new PlatformIdentifier().IsWindows
? new Host.IO.WindowsPostWriteHandler()
: new Host.IO.PosixPostWriteHandler(loggerFactory.CreateLogger<Host.IO.PosixPostWriteHandler>()));
var localRepoPath = Environment.GetEnvironmentVariable("TGS_LOCAL_TG_REPO");
Task jobWaitTask;
if (!String.IsNullOrWhiteSpace(localRepoPath))
{
await ioManager.CopyDirectory(
Enumerable.Empty<string>(),
(src, dest) =>
{
if (postWriteHandler.NeedsPostWrite(src))
postWriteHandler.HandleWrite(dest);

return ValueTask.CompletedTask;
},
ioManager.ConcatPath(
localRepoPath,
".git"),
ioManager.ConcatPath(
repoPath,
".git"),
null,
cancellationToken);

IProcessExecutor processExecutor = null;
processExecutor = new ProcessExecutor(
new PlatformIdentifier().IsWindows
? new WindowsProcessFeatures(loggerFactory.CreateLogger<WindowsProcessFeatures>())
: new PosixProcessFeatures(new Lazy<IProcessExecutor>(() => processExecutor), ioManager, loggerFactory.CreateLogger<PosixProcessFeatures>()),
ioManager,
loggerFactory.CreateLogger<ProcessExecutor>(),
loggerFactory);

async ValueTask RunGitCommand(string args)
{
await using var gitRemoteOriginFixProc = processExecutor.LaunchProcess(
"git",
repoPath,
args,
null,
true,
true);

int? exitCode;
using (cancellationToken.Register(gitRemoteOriginFixProc.Terminate))
exitCode = await gitRemoteOriginFixProc.Lifetime;

loggerFactory.CreateLogger("TgTest").LogInformation("git {args} output:{newLine}{output}",args, Environment.NewLine, await gitRemoteOriginFixProc.GetCombinedOutput(cancellationToken));
Assert.AreEqual(0, exitCode);
}

await RunGitCommand("remote set-url origin https://github.com/tgstation/tgstation");
await RunGitCommand("checkout -f master");
await RunGitCommand("reset --hard origin/master");

jobWaitTask = Task.CompletedTask;
}
else
{
var repoResponse = await instanceClient.Repository.Clone(new RepositoryCreateRequest
{
Origin = new Uri("https://github.com/tgstation/tgstation"),
}, cancellationToken);
jobWaitTask = jobsTest.WaitForJob(repoResponse.ActiveJob, 300, false, null, cancellationToken);
}

await Task.WhenAll(jobWaitTask, ddUpdateTask.AsTask(), dmUpdateTask.AsTask());

var depsBytesTask = ioManager.ReadAllBytes(
ioManager.ConcatPath(repoPath, "dependencies.sh"),
cancellationToken);

var scriptsCopyTask = ioManager.CopyDirectory(
Enumerable.Empty<string>(),
(src, dest) =>
{
if (postWriteHandler.NeedsPostWrite(src))
postWriteHandler.HandleWrite(dest);

return ValueTask.CompletedTask;
},
ioManager.ConcatPath(
repoPath,
"tools",
"tgs_scripts"),
ioManager.ConcatPath(
instance.Path,
"Configuration",
"EventScripts"),
null,
cancellationToken);

var dependenciesSh = Encoding.UTF8.GetString(await depsBytesTask);
var lines = dependenciesSh.Split("\n", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
const string MajorPrefix = "export BYOND_MAJOR=";
var major = Int32.Parse(lines.First(x => x.StartsWith(MajorPrefix)).Substring(MajorPrefix.Length));
const string MinorPrefix = "export BYOND_MINOR=";
var minor = Int32.Parse(lines.First(x => x.StartsWith(MinorPrefix)).Substring(MinorPrefix.Length));

var byondJob = await instanceClient.Byond.SetActiveVersion(new ByondVersionRequest

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Code Scanning

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Tests (Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Windows Tests (Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MariaDB, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (MySql, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (PostgresSql, System, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, Basic, Debug)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

'IInstanceClient' does not contain a definition for 'Byond' and no accessible extension method 'Byond' accepting a first argument of type 'IInstanceClient' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 1151 in tests/Tgstation.Server.Tests/Live/TestLiveServer.cs

View workflow job for this annotation

GitHub Actions / Linux Live Tests (Sqlite, System, Release)

The type or namespace name 'ByondVersionRequest' could not be found (are you missing a using directive or an assembly reference?)
{
Version = new Version(major, minor)
}, null, cancellationToken);

var byondJobTask = jobsTest.WaitForJob(byondJob.InstallJob, 60, false, null, cancellationToken);

await Task.WhenAll(scriptsCopyTask.AsTask(), byondJobTask);

var compileJob = await instanceClient.DreamMaker.Compile(cancellationToken);

await jobsTest.WaitForJob(compileJob, 180, false, null, cancellationToken);

var startJob = await instanceClient.DreamDaemon.Start(cancellationToken);
await jobsTest.WaitForJob(startJob, 30, false, null, cancellationToken);

var compileJob2 = await instanceClient.DreamMaker.Compile(cancellationToken);

await jobsTest.WaitForJob(compileJob2, 360, false, null, cancellationToken);

if (interactive)
{
bool updated = false;
while (true)
{
await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);

var status = await instanceClient.DreamDaemon.Read(cancellationToken);

if (updated)
{
if (status.Status == WatchdogStatus.Offline)
break;
}
else if (status.StagedCompileJob == null)
{
updated = true;
await instanceClient.DreamDaemon.Update(new DreamDaemonRequest
{
SoftShutdown = true
}, cancellationToken);
}
}
}
}
finally
{
serverCts.Cancel();
await serverTask;
}
}

[TestMethod]
public async Task TestStandardTgsOperation()
{
Expand All @@ -1004,9 +1215,7 @@ public async Task TestStandardTgsOperation()
}

using (var currentProcess = System.Diagnostics.Process.GetCurrentProcess())
{
Assert.AreEqual(ProcessPriorityClass.Normal, currentProcess.PriorityClass);
}

var maximumTestMinutes = TestingUtils.RunningInGitHubActions ? 90 : 20;
using var hardCancellationTokenSource = new CancellationTokenSource(TimeSpan.FromMinutes(maximumTestMinutes));
Expand Down Expand Up @@ -1194,7 +1403,9 @@ await EngineTest.GetEdgeVersion(EngineType.OpenDream, fileDownloader, cancellati
new EngineVersion
{
Engine = EngineType.Byond,
Version = new Version(510, 1346)
Version = new PlatformIdentifier().IsWindows
? new Version(510, 1346)
: new Version(512, 1451) // http://www.byond.com/forum/?forum=5&command=search&scope=local&text=resolved%3a512.1451
},
adminClient.Instances.CreateClient(compatInstance),
compatDMPort,
Expand Down

0 comments on commit 84a7d00

Please sign in to comment.