Added restore check to unittest

This commit is contained in:
Kenneth Skovhede
2016-04-01 00:15:56 +02:00
parent 450ee501fd
commit 406ecdd336
+15
View File
@@ -250,6 +250,21 @@ namespace Duplicati.UnitTest
//Console.WriteLine(string.Join(Environment.NewLine, r.Files.Select(x => x.Path)));
Assert.AreEqual(49, r.Files.Count());
}
using(var tf = new Library.Utility.TempFolder())
{
using(var c = new Library.Main.Controller("file://" + TARGETFOLDER, testopts.Expand(new { restore_path = tf, no_local_blocks = true }), null))
c.Restore(null);
TestUtils.VerifyDir(DATAFOLDER, tf, true);
}
using(var tf = new Library.Utility.TempFolder())
{
using(var c = new Library.Main.Controller("file://" + TARGETFOLDER, testopts.Expand(new { restore_path = tf, no_local_blocks = true }), null))
c.Restore(new string[] { Path.Combine(DATAFOLDER, "a") + "*" });
}
}
}
}