From e93c9634baf5de8a97277fdcf656bf72ad1569dd Mon Sep 17 00:00:00 2001 From: "OpenGenesis (MPL 2.0)" <153564363+opengenesislink@users.noreply.github.com> Date: Wed, 4 Nov 2026 09:46:01 +0100 Subject: [PATCH] test(iar): verify 10GiB quota, over-2GiB offsets and overflow rejection --- tools/ci/OglIarSelfServiceRegression/Program.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/ci/OglIarSelfServiceRegression/Program.cs b/tools/ci/OglIarSelfServiceRegression/Program.cs index 36046fc9..84d195e4 100644 --- a/tools/ci/OglIarSelfServiceRegression/Program.cs +++ b/tools/ci/OglIarSelfServiceRegression/Program.cs @@ -50,7 +50,19 @@ internal static class Program throw new Exception("Root accepted"); } catch (ArgumentException) { count++; } long max = OglIarTransferPolicy.DefaultMaximumArchiveBytes; - Check(max > 100L * 1024 * 1024, "uploads support >100 MiB"); + Check(max == 10L * 1024 * 1024 * 1024, "default IAR quota is 10 GiB"); + Check(max > int.MaxValue, "IAR quota exceeds signed 32-bit byte range"); + Check(OglIarTransferPolicy.AcceptChunk(3L * 1024 * 1024 * 1024, + 3L * 1024 * 1024 * 1024, OglIarTransferPolicy.MaximumChunkBytes, + max, max), "sequential 4MiB import chunk beyond 2GiB"); + Check(OglIarTransferPolicy.AcceptChunk(max - OglIarTransferPolicy.MaximumChunkBytes, + max - OglIarTransferPolicy.MaximumChunkBytes, + OglIarTransferPolicy.MaximumChunkBytes, max, max), + "final chunk exactly at 10GiB quota"); + Check(!OglIarTransferPolicy.AcceptChunk(max - OglIarTransferPolicy.MaximumChunkBytes, + max - OglIarTransferPolicy.MaximumChunkBytes, + OglIarTransferPolicy.MaximumChunkBytes + 1, max + 1, max), + "archive greater than 10GiB is rejected"); Check(OglIarTransferPolicy.AcceptChunk(0, 0, 4194304, 200000000, max), "first 4MiB chunk"); Check(OglIarTransferPolicy.AcceptChunk(4194304, 4194304, 4194304,