feat: Add MongoIdempotencyStoreOptions for MongoDB configuration
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
feat: Implement BsonJsonConverter for converting BsonDocument and BsonArray to JSON fix: Update project file to include MongoDB.Bson package test: Add GraphOverlayExporterTests to validate NDJSON export functionality refactor: Refactor Program.cs in Attestation Tool for improved argument parsing and error handling docs: Update README for stella-forensic-verify with usage instructions and exit codes feat: Enhance HmacVerifier with clock skew and not-after checks feat: Add MerkleRootVerifier and ChainOfCustodyVerifier for additional verification methods fix: Update DenoRuntimeShim to correctly handle file paths feat: Introduce ComposerAutoloadData and related parsing in ComposerLockReader test: Add tests for Deno runtime execution and verification test: Enhance PHP package tests to include autoload data verification test: Add unit tests for HmacVerifier and verification logic
This commit is contained in:
@@ -73,6 +73,44 @@ public sealed class DenoRuntimeTraceRunnerTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ExecutesShimAndWritesRuntime_WhenDenoPresent()
|
||||
{
|
||||
var binary = DenoBinaryLocator.Find();
|
||||
if (string.IsNullOrWhiteSpace(binary))
|
||||
{
|
||||
return; // gracefully skip when deno is unavailable in the environment
|
||||
}
|
||||
|
||||
var root = TestPaths.CreateTemporaryDirectory();
|
||||
try
|
||||
{
|
||||
var entry = Path.Combine(root, "main.ts");
|
||||
var fixture = Path.Combine(TestPaths.GetProjectRoot(), "TestFixtures/deno-runtime/simple/main.ts");
|
||||
File.Copy(fixture, entry);
|
||||
|
||||
using var entryEnv = new EnvironmentVariableScope("STELLA_DENO_ENTRYPOINT", "main.ts");
|
||||
using var binaryEnv = new EnvironmentVariableScope("STELLA_DENO_BINARY", binary);
|
||||
using var denoDirEnv = new EnvironmentVariableScope("DENO_DIR", Path.Combine(root, ".deno-cache"));
|
||||
|
||||
var context = new LanguageAnalyzerContext(root, TimeProvider.System);
|
||||
var result = await DenoRuntimeTraceRunner.TryExecuteAsync(context, logger: null, CancellationToken.None);
|
||||
|
||||
Assert.True(result);
|
||||
|
||||
var runtimePath = Path.Combine(root, "deno-runtime.ndjson");
|
||||
Assert.True(File.Exists(runtimePath));
|
||||
|
||||
var content = await File.ReadAllTextAsync(runtimePath);
|
||||
Assert.Contains("deno.runtime.start", content);
|
||||
Assert.Contains("deno.module.load", content);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TestPaths.SafeDelete(root);
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class EnvironmentVariableScope : IDisposable
|
||||
{
|
||||
private readonly string _name;
|
||||
|
||||
Reference in New Issue
Block a user