mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-10 21:33:19 +00:00
Fixed test build errors caused by previous merges
This commit is contained in:
@@ -503,7 +503,7 @@ func TestPersistRestore(t *testing.T) {
|
|||||||
time.Sleep(time.Duration(delay) * time.Second)
|
time.Sleep(time.Duration(delay) * time.Second)
|
||||||
cleanStorage(unencStorage)
|
cleanStorage(unencStorage)
|
||||||
|
|
||||||
if !ConfigStorage(unencStorage, 16384, 100, 64*1024, 256*1024, 16*1024, "", nil, false, "") {
|
if !ConfigStorage(unencStorage, 16384, 100, 64*1024, 256*1024, 16*1024, "", nil, false, "", 0, 0) {
|
||||||
t.Errorf("Failed to initialize the unencrypted storage")
|
t.Errorf("Failed to initialize the unencrypted storage")
|
||||||
}
|
}
|
||||||
time.Sleep(time.Duration(delay) * time.Second)
|
time.Sleep(time.Duration(delay) * time.Second)
|
||||||
@@ -522,14 +522,14 @@ func TestPersistRestore(t *testing.T) {
|
|||||||
time.Sleep(time.Duration(delay) * time.Second)
|
time.Sleep(time.Duration(delay) * time.Second)
|
||||||
cleanStorage(storage)
|
cleanStorage(storage)
|
||||||
|
|
||||||
if !ConfigStorage(storage, 16384, 100, 64*1024, 256*1024, 16*1024, password, unencConfig, true, "") {
|
if !ConfigStorage(storage, 16384, 100, 64*1024, 256*1024, 16*1024, password, unencConfig, true, "", 0, 0) {
|
||||||
t.Errorf("Failed to initialize the encrypted storage")
|
t.Errorf("Failed to initialize the encrypted storage")
|
||||||
}
|
}
|
||||||
time.Sleep(time.Duration(delay) * time.Second)
|
time.Sleep(time.Duration(delay) * time.Second)
|
||||||
|
|
||||||
// do unencrypted backup
|
// do unencrypted backup
|
||||||
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
||||||
unencBackupManager := CreateBackupManager("host1", unencStorage, testDir, "", "", "")
|
unencBackupManager := CreateBackupManager("host1", unencStorage, testDir, "", "", "", false)
|
||||||
unencBackupManager.SetupSnapshotCache("default")
|
unencBackupManager.SetupSnapshotCache("default")
|
||||||
|
|
||||||
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
||||||
@@ -539,7 +539,7 @@ func TestPersistRestore(t *testing.T) {
|
|||||||
|
|
||||||
// do encrypted backup
|
// do encrypted backup
|
||||||
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
||||||
encBackupManager := CreateBackupManager("host1", storage, testDir, password, "", "")
|
encBackupManager := CreateBackupManager("host1", storage, testDir, password, "", "", false)
|
||||||
encBackupManager.SetupSnapshotCache("default")
|
encBackupManager.SetupSnapshotCache("default")
|
||||||
|
|
||||||
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
SetDuplicacyPreferencePath(testDir + "/repository1/.duplicacy")
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ func TestEntryExcludeByAttribute(t *testing.T) {
|
|||||||
for _, file := range DATA {
|
for _, file := range DATA {
|
||||||
fullPath := filepath.Join(testDir, file)
|
fullPath := filepath.Join(testDir, file)
|
||||||
if strings.Contains(file, "exclude") {
|
if strings.Contains(file, "exclude") {
|
||||||
xattr.Setxattr(fullPath, AttributeExcludeName, []byte(AttributeExcludeValue))
|
xattr.Setxattr(fullPath, "com.apple.metadata:com_apple_backup_excludeItem", []byte("com.apple.backupd"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user