Made the default keys of the rsync json be parsed in kebab-case, and added a test for the sync-on-warnings flag
This commit is contained in:
@@ -379,6 +379,21 @@ namespace Duplicati.UnitTest
|
||||
Assert.AreEqual(0, destinations.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("RemoteSync")]
|
||||
public void TestConfigure_SyncOnWarnings()
|
||||
{
|
||||
var options = new Dictionary<string, string>
|
||||
{
|
||||
["remote-sync-json-config"] = $"{{\"sync-on-warnings\": false, \"destinations\": [{{\"url\": \"file://{dest1}\"}}]}}"
|
||||
};
|
||||
|
||||
module.Configure(options);
|
||||
|
||||
var syncOnWarnings = module.GetType().GetField("m_syncOnWarnings", BINDING_FLAGS).GetValue(module);
|
||||
Assert.IsFalse((bool)syncOnWarnings);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("RemoteSync")]
|
||||
public void TestShouldTriggerSync_Scheduled_Initial()
|
||||
|
||||
Reference in New Issue
Block a user