Path: redb/redb.Tests.Integration/Tests/Unit/StreamsIndexesFilePinTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/Unit/StreamsIndexesFilePinTests.cs ---- using System.Runtime.CompilerServices; using System.Security.Cryptography; using System.Text; namespace redb.Tests.Integration.Tests.Unit; /// /// The streams index files of PostgreSQL Pro and SQL Server Pro are built once, at the module step that brings them /// (StreamsIndexes.Since). A change of a file therefore goes with a new module version and Since set to it; otherwise /// no existing database ever builds the changed set at start-up. This pin fails on any change of either file until the /// hash here is updated, which is the moment to do both. /// public class StreamsIndexesFilePinTests { [Theory] [InlineData("redb.Postgres.Pro", "84C1FDB8E26648AB135D863491FA26DFCED6520000ED4EB8AAE2DA424A23ACD1", "0.7.33")] [InlineData("redb.MSSql.Pro", "6D6447044394F386A34961ADE314FA5C6602BC253389570455957E1F41F5CEB9", "0.2.50")] public void StreamsIndexFile_IsTheOneItsSinceVersionBrings(string project, string sha256, string since) { var text = File.ReadAllText(Path.Combine(SourceRoot(), project, "Sql", "pvt_streams_indexes.sql")).Replace("\r\n", "\n"); Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(text))).Should().Be(sha256, "{0}/Sql/pvt_streams_indexes.sql changed: bump the module version, set StreamsIndexes.Since (now {1}) to it, " + "then update this hash", project, since); } private static string SourceRoot([CallerFilePath] string path = "") => Path.Combine(Directory.GetParent(path)!.Parent!.Parent!.Parent!.FullName, "src"); }