feat: initialize existing development playout PCs
This commit is contained in:
@@ -189,7 +189,7 @@ public sealed class DevelopmentLiveLaunchBootstrapTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EnvironmentFailure_RestoresEveryPreviousProcessValue()
|
||||
public void EnvironmentFailure_DisarmsEveryPreviousProcessValue()
|
||||
{
|
||||
var platform = FakePlatform.Valid();
|
||||
platform.Environment[
|
||||
@@ -209,20 +209,32 @@ public sealed class DevelopmentLiveLaunchBootstrapTests
|
||||
|
||||
Assert.Equal(DevelopmentLiveBootstrapStatus.Rejected, result.Status);
|
||||
Assert.Equal("development-live-environment-failed", result.Code);
|
||||
Assert.Equal(
|
||||
"old-native",
|
||||
platform.Environment[
|
||||
InstalledK3dInteropMetadata.ApprovedNativeSha256EnvironmentVariable]);
|
||||
Assert.Equal(
|
||||
"old-interop",
|
||||
platform.Environment[
|
||||
InstalledK3dInteropMetadata.ApprovedSha256EnvironmentVariable]);
|
||||
Assert.Equal(
|
||||
"DryRun",
|
||||
platform.Environment[DevelopmentLiveLaunchBootstrap.ModeEnvironmentVariable]);
|
||||
Assert.Equal(
|
||||
"old-authorization",
|
||||
platform.Environment[PlayoutOptionsLoader.LiveAuthorizationEnvironmentVariable]);
|
||||
Assert.Empty(platform.Environment);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RejectedExactDebugRequest_DisarmsInheritedLiveGates()
|
||||
{
|
||||
var platform = new FakePlatform(Encoding.UTF8.GetBytes("{}"));
|
||||
platform.Environment[
|
||||
InstalledK3dInteropMetadata.ApprovedNativeSha256EnvironmentVariable] =
|
||||
new string('A', 64);
|
||||
platform.Environment[
|
||||
InstalledK3dInteropMetadata.ApprovedSha256EnvironmentVariable] =
|
||||
new string('B', 64);
|
||||
platform.Environment[DevelopmentLiveLaunchBootstrap.ModeEnvironmentVariable] =
|
||||
DevelopmentLiveLaunchBootstrap.RequiredMode;
|
||||
platform.Environment[PlayoutOptionsLoader.LiveAuthorizationEnvironmentVariable] =
|
||||
PlayoutOptionsLoader.RequiredLiveAuthorizationValue;
|
||||
|
||||
var result = DevelopmentLiveLaunchBootstrap.TryApply(
|
||||
DevelopmentLiveLaunchBootstrap.ExactLaunchArgument,
|
||||
isDebugBuild: true,
|
||||
"authorization.json",
|
||||
platform);
|
||||
|
||||
Assert.Equal(DevelopmentLiveBootstrapStatus.Rejected, result.Status);
|
||||
Assert.Empty(platform.Environment);
|
||||
}
|
||||
|
||||
public static TheoryData<string> InvalidAuthorizationJson() => new()
|
||||
|
||||
Reference in New Issue
Block a user