]> git.saurik.com Git - apt.git/blobdiff - test/pre-upload-check.py
append the dist (e.g. sid, wheezy) as a query string when
[apt.git] / test / pre-upload-check.py
index 9c2e1916c6861491101a3517c2c586c832cb43a2..f9da8f941eaedc93c507354c92a1c8f044339a73 100755 (executable)
@@ -192,6 +192,20 @@ class testAuthentication(unittest.TestCase):
                 self.assert_(len(glob.glob("/var/lib/apt/lists/partial/*")) == 0,
                              "partial/ dir has leftover files: %s" % glob.glob("/var/lib/apt/lists/partial/*"))
 
+    def testValid(self):
+        for f in glob.glob("testsources.list/sources.list*validuntil*"):
+            self._cleanup()
+            (prefix, testtype, result) = f.split("-")
+            expected_res = self._expectedRes(result)
+            cmd = ["update"]
+            res = call([self.apt,"-o","Dir::Etc::sourcelist=./%s" % f]+cmd+apt_args,
+                       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):
     " test local repository regressions "
@@ -248,5 +262,5 @@ if __name__ == "__main__":
         stderr = sys.stderr
     
     # run only one for now
-    unittest.main(defaultTest="testAptAuthenticationReliability")
-    #unittest.main()
+    #unittest.main(defaultTest="testAptAuthenticationReliability")
+    unittest.main()