Add read-only MCP server with token access
Build and deploy / build (push) Successful in 1m31s
Build and deploy / deploy (push) Successful in 20s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-15 13:34:16 +01:00
1 parent b8328f6998
commit 49a8fa1154
34 files changed
+1625

No files matched your search

@@ -0,0 +1,36 @@
using Flypaper.Storage.Queries;
using Shouldly;
namespace Flypaper.Tests.Mcp;
public sealed class QueryPeriodTests
{
[Theory]
[InlineData("30m", 0.5)]
[InlineData("1h", 1)]
[InlineData("24H", 24)]
[InlineData("7d", 168)]
[InlineData("2w", 336)]
public void Parses_relative_periods(string value, double hours)
{
QueryPeriod.TryParse(value, out var span).ShouldBeTrue();
span.ShouldBe(TimeSpan.FromHours(hours));
}
[Theory]
[InlineData("all")]
[InlineData("")]
[InlineData(null)]
public void Treats_all_as_unbounded(string? value)
{
QueryPeriod.TryParse(value, out var span).ShouldBeTrue();
span.ShouldBeNull();
}
[Theory]
[InlineData("0d")]
[InlineData("1y")]
[InlineData("1.5h")]
[InlineData("h")]
public void Rejects_other_values(string value) => QueryPeriod.TryParse(value, out _).ShouldBeFalse();
}