X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/5177f8024b512f1dca86aaececc5fbc708948ad4..45df0ad2aab7d019cec855ba2cfe7ecdd0f8c7c8:/test/pre-upload-check.py diff --git a/test/pre-upload-check.py b/test/pre-upload-check.py index 8131d891e..268b3d672 100755 --- a/test/pre-upload-check.py +++ b/test/pre-upload-check.py @@ -15,7 +15,12 @@ apt_args = [] # ["-o","Debug::pkgAcquire::Auth=true"] class testAuthentication(unittest.TestCase): - + """ + test if the authentication is working, the repository + of the test-data can be found here: + bzr get http://people.ubuntu.com/~mvo/bzr/apt/apt-auth-test-suit/ + """ + # some class wide data apt = "apt-get" pkg = "libglib2.0-data" @@ -67,7 +72,6 @@ class testAuthentication(unittest.TestCase): call([self.apt,"update", "-o","Dir::Etc::sourcelist=./%s" % f]+apt_args, stdout=stdout, stderr=stderr) - # then get the pkg cmd = ["install", "-y", "-d", "--reinstall", "%s=%s" % (self.pkg, self.pkgver), "-o","Dir::state::Status=./fake-status"] @@ -87,7 +91,9 @@ class testAuthentication(unittest.TestCase): stdout=stdout, stderr=stderr) self.assert_(res == expected_res, "test '%s' failed (got %s expected %s" % (f,res,expected_res)) - + if expected_res == 0: + self.assert_(len(glob.glob("/var/lib/apt/lists/partial/*")) == 0, + "partial/ dir has leftover files: %s" % glob.glob("/var/lib/apt/lists/partial/*")) class testLocalRepositories(unittest.TestCase):