mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Merge branch 'master' into notoken
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!-- This is in it's own file to help incremental building, changing it causes a complete rebuild of the web panel -->
|
||||
<TgsControlPanelVersion>2.1.3</TgsControlPanelVersion>
|
||||
<TgsControlPanelVersion>2.1.4</TgsControlPanelVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<TgsConfigVersion>3.0.0</TgsConfigVersion>
|
||||
<TgsApiVersion>8.3.0</TgsApiVersion>
|
||||
<TgsClientVersion>9.2.0</TgsClientVersion>
|
||||
<TgsDmapiVersion>6.0.1</TgsDmapiVersion>
|
||||
<TgsDmapiVersion>6.0.2</TgsDmapiVersion>
|
||||
<TgsInteropVersion>5.3.0</TgsInteropVersion>
|
||||
<TgsHostWatchdogVersion>1.1.1</TgsHostWatchdogVersion>
|
||||
<TgsContainerScriptVersion>1.2.0</TgsContainerScriptVersion>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "6.0.1"
|
||||
#define TGS_DMAPI_VERSION "6.0.2"
|
||||
|
||||
// All functions and datums outside this document are subject to change with any version and should not be relied on.
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
// #define TGS_EVENT_WORLD_END_PROCESS 19
|
||||
// #define TGS_EVENT_WORLD_REBOOT 20
|
||||
/// Watchdog event when TgsInitializationComplete() is called. No parameters.
|
||||
#define TGS_EVENT_WORLD_PRIME 21
|
||||
#define TGS_EVENT_WORLD_PRIME 21
|
||||
|
||||
// OTHER ENUMS
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
var/datum/tgs_revision_information/test_merge/tm = new
|
||||
tm.number = text2num(I)
|
||||
var/list/entry = json[I]
|
||||
tm.pull_request_commit = entry["commit"]
|
||||
tm.head_commit = entry["commit"]
|
||||
tm.author = entry["author"]
|
||||
tm.title = entry["title"]
|
||||
. += tm
|
||||
|
||||
@@ -182,9 +182,6 @@ namespace Tgstation.Server.Host.Controllers
|
||||
if (headersException.MissingOrMalformedHeaders.HasFlag(HeaderTypes.Accept))
|
||||
return StatusCode(HttpStatusCode.NotAcceptable, errorMessage);
|
||||
|
||||
if (headersException.MissingOrMalformedHeaders == HeaderTypes.Authorization)
|
||||
return Unauthorized(errorMessage);
|
||||
|
||||
return BadRequest(errorMessage);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
#define TGS_ERROR_LOG(message) world.log << "Err: [##message]"
|
||||
#define TGS_NOTIFY_ADMINS(event)
|
||||
#define TGS_CLIENT_COUNT 0
|
||||
#define TGS_V3_API
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/world_params = params2list(world.params)
|
||||
if(!("test" in world_params) || world_params["test"] != "bababooey")
|
||||
text2file("Expected parameter test=bababooey but did not receive", "test_fail_reason.txt")
|
||||
|
||||
|
||||
world.log << "sleep2"
|
||||
sleep(150)
|
||||
world.log << "Terminating..."
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace Tgstation.Server.Tests.Instance
|
||||
|
||||
Assert.IsNotNull(newerCompileJob);
|
||||
Assert.AreNotEqual(initialCompileJob.Id, newerCompileJob.Id);
|
||||
Assert.AreEqual(DreamDaemonSecurity.Safe, newerCompileJob.MinimumSecurityLevel);
|
||||
Assert.AreEqual(DreamDaemonSecurity.Trusted, newerCompileJob.MinimumSecurityLevel);
|
||||
Assert.AreEqual(DMApiConstants.InteropVersion, daemonStatus.StagedCompileJob.DMApiVersion);
|
||||
await instanceClient.DreamDaemon.Shutdown(cancellationToken);
|
||||
}
|
||||
@@ -157,13 +157,13 @@ namespace Tgstation.Server.Tests.Instance
|
||||
AdditionalParameters = "test=bababooey"
|
||||
}, cancellationToken);
|
||||
Assert.AreEqual("test=bababooey", daemonStatus.AdditionalParameters);
|
||||
daemonStatus = await DeployTestDme("BasicOperation/basic_operation_test", DreamDaemonSecurity.Ultrasafe, true, cancellationToken);
|
||||
daemonStatus = await DeployTestDme("BasicOperation/basic_operation_test", DreamDaemonSecurity.Trusted, true, cancellationToken);
|
||||
|
||||
Assert.AreEqual(WatchdogStatus.Offline, daemonStatus.Status.Value);
|
||||
Assert.IsNotNull(daemonStatus.ActiveCompileJob);
|
||||
Assert.IsNull(daemonStatus.StagedCompileJob);
|
||||
Assert.AreEqual(DMApiConstants.InteropVersion, daemonStatus.ActiveCompileJob.DMApiVersion);
|
||||
Assert.AreEqual(DreamDaemonSecurity.Safe, daemonStatus.ActiveCompileJob.MinimumSecurityLevel);
|
||||
Assert.AreEqual(DreamDaemonSecurity.Trusted, daemonStatus.ActiveCompileJob.MinimumSecurityLevel);
|
||||
|
||||
Job startJob;
|
||||
if (new PlatformIdentifier().IsWindows) // Can't get address reuse to trigger on linux for some reason
|
||||
|
||||
@@ -136,6 +136,20 @@ namespace Tgstation.Server.Tests
|
||||
Assert.AreEqual(ErrorCode.InstanceHeaderRequired, message.ErrorCode);
|
||||
}
|
||||
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Get, url.ToString()))
|
||||
{
|
||||
request.Headers.Accept.Clear();
|
||||
request.Headers.UserAgent.Add(new ProductInfoHeaderValue("RootTest", "1.0.0"));
|
||||
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
|
||||
request.Headers.Add(ApiHeaders.ApiVersionHeader, "Tgstation.Server.Api/" + ApiHeaders.Version);
|
||||
request.Headers.Authorization = new AuthenticationHeaderValue(ApiHeaders.BearerAuthenticationScheme.ToLower(), token);
|
||||
using var response = await httpClient.SendAsync(request, cancellationToken);
|
||||
Assert.AreEqual(HttpStatusCode.BadRequest, response.StatusCode);
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
var message = JsonConvert.DeserializeObject<ErrorMessage>(content);
|
||||
Assert.AreEqual(ErrorCode.BadHeaders, message.ErrorCode);
|
||||
}
|
||||
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, url.ToString()))
|
||||
{
|
||||
request.Headers.Accept.Clear();
|
||||
|
||||
Reference in New Issue
Block a user