Add test for listing filesets without local database.
This test would have failed prior to the changes in revision8ab64071f0("Display correct backup type when using direct restore"). Prior to revision8ab64071f0, all filesets would have been marked as partial when performing a direct restore without the local database. This concerns issue #3982.
This commit is contained in:
@@ -193,6 +193,35 @@ namespace Duplicati.UnitTest
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("Disruption")]
|
||||
public async Task ListWithoutLocalDb()
|
||||
{
|
||||
// Choose a dblock size that is small enough so that more than one volume is needed.
|
||||
Dictionary<string, string> options = new Dictionary<string, string>(this.TestOptions)
|
||||
{
|
||||
["dblock-size"] = "10mb",
|
||||
["no-local-db"] = "true"
|
||||
};
|
||||
|
||||
// Run a full backup.
|
||||
using (Controller c = new Controller("file://" + this.TARGETFOLDER, options, null))
|
||||
{
|
||||
c.Backup(new[] {this.DATAFOLDER});
|
||||
}
|
||||
|
||||
// Run a partial backup.
|
||||
using (Controller c = new Controller("file://" + this.TARGETFOLDER, options, null))
|
||||
{
|
||||
await this.RunPartialBackup(c).ConfigureAwait(false);
|
||||
|
||||
List<IListResultFileset> filesets = c.List().Filesets.ToList();
|
||||
Assert.AreEqual(2, filesets.Count);
|
||||
Assert.AreEqual(BackupType.FULL_BACKUP, filesets[1].IsFullBackup);
|
||||
Assert.AreEqual(BackupType.PARTIAL_BACKUP, filesets[0].IsFullBackup);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("Disruption")]
|
||||
public async Task RetentionPolicyRetention()
|
||||
|
||||
Reference in New Issue
Block a user