]> git.saurik.com Git - apt.git/blobdiff - test/pre-upload-check.py
Slovak translation updated
[apt.git] / test / pre-upload-check.py
index 8131d891e38c84600abf34bf60fc3e1547c922ec..268b3d6720a321093faad41a6e6b35bfb7d5b8e4 100755 (executable)
@@ -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):