mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
09.32.2018 4ece88750272b3e2fc0bbccec7202d2faa1115b8
borgbutler-core/src/test/java/de/micromata/borgbutler/cache/CacheTest.java
@@ -52,7 +52,7 @@
        BorgRepoConfig repoConfig = null;
        if (CollectionUtils.isNotEmpty(repoConfigs)) {
            repoConfig = repoConfigs.get(0);
            RepoList repoList = ButlerCache.getInstance().getRepoListCache().get(repoConfig.getRepo());
            RepoList repoList = ButlerCache.getInstance().getRepoListCache().get(repoConfig, repoConfig.getRepo());
            if (repoList != null && CollectionUtils.isNotEmpty(repoList.getArchives())) {
                archive = repoList.getArchives().get(0);
            }
@@ -72,11 +72,11 @@
                }
            }*/
        }
        {
        {/*
            if (archive != null) {
                String json = BorgCommands.list(repoConfig, archive.getArchive());
                log.info(json);
            }
            }*/
        }
        butlerCache.save();
    }
@@ -85,8 +85,8 @@
        for (BorgRepoConfig repo : config.getRepoConfigs()) {
            log.info("Processing repo info '" + repo + "'");
            RepoInfo repoInfo = BorgCommands.info(repo);
            repoInfoCache.upsert(repoInfo);
            repoInfo = repoInfoCache.get(repoInfo.getRepository().getId());
            repoInfoCache.upsert(repo, repoInfo);
            repoInfo = repoInfoCache.get(repo, repoInfo.getRepository().getId());
            assertNotNull(repoInfo);
        }
    }
@@ -95,8 +95,8 @@
        for (BorgRepoConfig repo : config.getRepoConfigs()) {
            log.info("Processing repo list '" + repo + "'");
            RepoList repoList = BorgCommands.list(repo);
            repoListCache.upsert(repoList);
            repoList = repoListCache.get(repoList.getRepository().getId());
            repoListCache.upsert(repo, repoList);
            repoList = repoListCache.get(repo, repoList.getRepository().getId());
            assertNotNull(repoList);
        }
    }
@@ -105,8 +105,8 @@
        for (BorgRepoConfig repo : config.getRepoConfigs()) {
            log.info("Processing repo list '" + repo + "'");
            RepoList repoList = BorgCommands.list(repo);
            repoListCache.upsert(repoList);
            repoList = repoListCache.get(repoList.getRepository().getId());
            repoListCache.upsert(repo, repoList);
            repoList = repoListCache.get(repo, repoList.getRepository().getId());
            assertNotNull(repoList);
        }
    }