1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-21 18:53:37 +00:00

Follow-up changes for PR#259

This commit is contained in:
Gilbert Chen
2017-11-10 13:50:22 -05:00
parent 669d5ed3f4
commit a6de3c1e74
2 changed files with 13 additions and 1 deletions

View File

@@ -86,6 +86,10 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) {
storage, err := CreateS3CStorage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads)
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
} else if testStorageName == "digitalocean" {
storage, err := CreateS3CStorage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads)
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
return storage, err
} else if testStorageName == "minio" {
storage, err := CreateS3Storage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads, false, true)
storage.SetDefaultNestingLevels([]int{2, 3}, 2)
@@ -579,4 +583,12 @@ func TestCleanStorage(t *testing.T) {
storage.DeleteFile(0, "config")
LOG_INFO("DELETE_FILE", "Deleted config")
files, _, err := storage.ListFiles(0, "chunks/")
for _, file := range files {
if len(file) > 0 && file[len(file)-1] != '/' {
LOG_DEBUG("FILE_EXIST", "File %s exists after deletion", file)
}
}
}