fix: 修正跟踪规则的正则无法生效的BUG,匹配前不能全部转小写,因为正则匹配需要区分大小写
大石头 authored at 2023-06-24 09:24:15
446.00 B
Stardust
using Stardust.Data.Monitors;
using Xunit;

namespace Stardust.ServerTests;

public class TraceRuleTests
{
    [Fact]
    public void GetOrAddItem()
    {
        var name = "/Admin/Menu/Index";
        var rule = TraceRule.Match(name);
        Assert.NotNull(rule);

        var app = AppTracer.FindByName("StarWeb");
        var ti = app.GetOrAddItem(name, rule?.IsWhite);
        Assert.NotNull(ti);
        Assert.True(ti.Enable);
    }
}