Added test for BackupRead if supported

This commit is contained in:
Kenneth Skovhede
2025-07-03 17:04:22 +02:00
parent 8ef2e85638
commit fe2ecfec4a
+19 -1
View File
@@ -1,4 +1,4 @@
// Copyright (C) 2025, The Duplicati Team
// Copyright (C) 2025, The Duplicati Team
// https://duplicati.com, hello@duplicati.com
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,6 +26,7 @@ using System.Linq;
using System.Collections.Generic;
using Duplicati.Library.Interface;
using Assert = NUnit.Framework.Legacy.ClassicAssert;
using Duplicati.Library.Utility;
namespace Duplicati.UnitTest
{
@@ -175,6 +176,23 @@ namespace Duplicati.UnitTest
});
}
[Test]
[Category("Border")]
public void Run10kBackupRead()
{
if (!PermissionHelper.HasSeBackupPrivilege())
{
Assert.Ignore("This test requires the SeBackupPrivilege to be set, which is not available in this environment.");
}
else
{
RunCommands(1024 * 10, modifyOptions: opts =>
{
opts["backupread-policy"] = "required";
});
}
}
public static Dictionary<string, int> WriteTestFilesToFolder(string targetfolder, int blocksize, int basedatasize = 0)
{
if (basedatasize <= 0)