diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-26 15:22:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-09-26 15:48:26 -0400 |
commit | 45de45b658d33c746fcb25cc469c9d7c1f4d7059 (patch) | |
tree | 47990dc514fd6501ac11d9486ed1363ea578d9a9 | |
parent | 54f9a08c6e7d812bed6b37e857c1766392220d80 (diff) |
test: make_repo_torrents: Verify that it recovers from previous failures [ci-skip]
-rw-r--r-- | test/cases/make_repo_torrents.bats | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/test/cases/make_repo_torrents.bats b/test/cases/make_repo_torrents.bats index 182449f..4d37ded 100644 --- a/test/cases/make_repo_torrents.bats +++ b/test/cases/make_repo_torrents.bats @@ -44,7 +44,26 @@ load ../lib/common releasePackage extra 'pkg-any-b' db-update - chmod -w ${FTP_BASE}/core/os/i686 + chmod -w "${FTP_BASE}/core/os/i686" if make_repo_torrents; then return 1; fi - chmod +w ${FTP_BASE}/core/os/i686 + chmod +w "${FTP_BASE}/core/os/i686" +} + +@test "make torrents maintains the pool after failure" { + releasePackage core 'pkg-any-a' + db-update + + mkdir "${FTP_BASE}/torrents" + chmod -w "${FTP_BASE}/torrents" + if make_repo_torrents; then return 1; fi + chmod +w "${FTP_BASE}/torrents" + + [[ ! -f "${FTP_BASE}/torrents/pkg-any-a-1-1-any${PKGEXT}.torrent" ]] + [[ -f "${FTP_BASE}/core/os/i686/pkg-any-a-1-1-any${PKGEXT}.torrent" ]] + + make_repo_torrents + + [[ -f "${FTP_BASE}/torrents/pkg-any-a-1-1-any${PKGEXT}.torrent" ]] + [[ -L "${FTP_BASE}/torrents/pkg-any-a-1-1-any${PKGEXT}.torrent" ]] + [[ -f "${FTP_BASE}/core/os/i686/pkg-any-a-1-1-any${PKGEXT}.torrent" ]] } |