Commit 2e83a522 authored by Morgan Adamiec's avatar Morgan Adamiec Committed by Allan McRae
Browse files

pactest: add test case for servers returning 404 with body


Signed-off-by: Morgan Adamiec's avatarmorganamilo <morganamilo@archlinux.org>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 3401f9e1
......@@ -173,6 +173,7 @@ pacman_tests = [
'tests/symlink012.py',
'tests/symlink020.py',
'tests/symlink021.py',
'tests/sync-failover-404-with-body.py',
'tests/sync-install-assumeinstalled.py',
'tests/sync-nodepversion01.py',
'tests/sync-nodepversion02.py',
......
self.description = "server failover after 404"
self.require_capability("curl")
p1 = pmpkg('pkg')
self.addpkg2db('sync', p1)
url_broke = self.add_simple_http_server({
'/{}'.format(p1.filename()): {
'code': 404,
'body': 'a',
}
})
url_good = self.add_simple_http_server({
'/{}'.format(p1.filename()): p1.makepkg_bytes(),
})
self.db['sync'].option['Server'] = [ url_broke, url_good ]
self.db['sync'].syncdir = False
self.cachepkgs = False
self.args = '-S pkg'
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment