Files
BinaryAlley b30cbd6b9e Adds bundled plugin trust and cross-platform native deployment
- embeds the append-only historical and deny trust lists in the API and marks matching bundled plugins as Official without blocking loading
- builds and records the current plugin manifest only for official release builds
- deploys the PDF native libraries for the supported Linux, macOS and Windows runtimes from the plugin dependency manifest
- records release hashes by appending only missing entries to master's manifest and rejects any diff that removes a line
- documents the release flow, the supported runtimes and the plugin installer limits
2026-11-28 18:00:00 +02:00

43 lines
1.9 KiB
C#

#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics.CodeAnalysis;
using Xunit;
#endregion
namespace Nemera.Presentation.Api.IntegrationTests.Common.Setup;
/// <summary>
/// Marks a test that only runs when the named environment variable is set.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
[ExcludeFromCodeCoverage]
public sealed class EnvironmentVariableFactAttribute : FactAttribute
{
/// <summary>
/// The name of the environment variable that must be set for the test to run.
/// </summary>
/// <remarks>
/// The name is stored because Skip is evaluated later, during test discovery.
/// </remarks>
private readonly string _environmentVariableName;
/// <summary>
/// Initializes a new instance of the <see cref="EnvironmentVariableFactAttribute"/> class.
/// </summary>
/// <param name="environmentVariableName">The name of the environment variable that must be set for the test to run.</param>
public EnvironmentVariableFactAttribute(string environmentVariableName)
{
_environmentVariableName = environmentVariableName;
}
/// <summary>
/// Gets the reason to skip the test. If set, the test will be skipped instead of executed.
/// </summary>
/// <remarks>
/// The published-artifact verification is opt-in: build/build.proj sets the variable only when it checks a publish output. Without it, the test would inspect a directory that does not exist, so it is skipped with a reason instead.
/// </remarks>
public override string Skip => string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_environmentVariableName))
? $"The environment variable '{_environmentVariableName}' is not set."
: string.Empty;
}