Rund 2.600 Kommentarblöcke in 310 C#-Dateien übersetzt, Begründungen vollständig erhalten: blockweise gleiche Anzahl wie vorher, kein Block unter 60 % seiner Länge, der Code außerhalb der Kommentare per Tokenizer byte-identisch geprüft. Zitate deutscher Oberflächentexte und Testdaten bleiben deutsch. WebUI: Kommentare in JS/CSS/HTML übersetzt, JSDoc-@param an die in 4b umbenannten Parameter angeglichen. Dabei behoben: - 4b hatte "tag" (HTML-Tag) als deutsches "Tag" gelesen und zu "dayValue" gemacht (makeElement, svg, Tagesübersicht) - zurück auf tag/day. - Aufgaben "InProgress" bekamen die Plakettenart "laufend", für die es nie eine CSS-Klasse gab - jetzt "success" wie laufende Instanzen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using System.Runtime.CompilerServices;
|
|
using ClawdDotNet.Core.Security;
|
|
|
|
namespace ClawdDotNet.Core.Tests.Infrastructure;
|
|
|
|
/// <summary>
|
|
/// Keeps the key of <see cref="SecretKeyStore"/> out of the tests.
|
|
///
|
|
/// Two things must come together:
|
|
///
|
|
/// 1. <see cref="Init"/> relocates the key <b>once when loading</b> the
|
|
/// test assembly into a throwaway directory. Without that the tests would create or read
|
|
/// the real user key — on the development machine as on the
|
|
/// build server.
|
|
///
|
|
/// 2. Whoever changes the key <em>during</em> a test (for example to check that
|
|
/// a foreign key does not read) must run in this collection. The store
|
|
/// is static; without parallelism switched off, such a change would pull the key
|
|
/// out from under a class running at the same time. Exactly that
|
|
/// happened between the secret and the backup tests.
|
|
/// </summary>
|
|
[CollectionDefinition(Name, DisableParallelization = true)]
|
|
public sealed class SecretKeyCollection
|
|
{
|
|
public const string Name = "SecretKey";
|
|
|
|
[ModuleInitializer]
|
|
internal static void Init()
|
|
{
|
|
SecretKeyStore.UseDirectory(Path.Combine(
|
|
Path.GetTempPath(), "clawd-tests", "keys", Guid.NewGuid().ToString("N")));
|
|
}
|
|
}
|