]> git.saurik.com Git - apt.git/commitdiff
merged from apt-authentication-reliablity
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Feb 2008 13:31:29 +0000 (14:31 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Feb 2008 13:31:29 +0000 (14:31 +0100)
1  2 
test/pre-upload-check.py

diff --combined test/pre-upload-check.py
index ae0067e52bc394e0ded6e6961e796cb3132065ca,9c2e1916c6861491101a3517c2c586c832cb43a2..97a0ec4c4c274929dc4f603b79642c20ab1bc912
@@@ -27,6 -27,8 +27,8 @@@ class testAptAuthenticationReliability(
      def setUp(self):
          if os.path.exists("/tmp/autFailure"):
              os.unlink("/tmp/authFailure");
+         if os.path.exists("/tmp/autFailure2"):
+             os.unlink("/tmp/authFailure2");
      def testRepositorySigFailure(self):
          """
          test if a repository that used to be authenticated and fails on
@@@ -49,8 -51,7 +51,7 @@@
          self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages"),
                       "The Packages file disappeared, this should not happen")
          self.assert_(os.path.exists("/tmp/authFailure"),
-                      "The APT::Update::Auth-Failure script did not run")
-         os.unlink("/tmp/authFailure");
+                      "The APT::Update::Auth-Failure script did not run (1)")
          # the same with i-m-s hit this time
          for f in glob.glob("./authReliability/lists/*"):
              shutil.copy(f,"/var/lib/apt/lists")
          res = call([self.apt,
                      "update",
                      "-o","Dir::Etc::sourcelist=./authReliability/sources.list.failure",
-                     "-o",'APT::Update::Auth-Failure::=touch /tmp/authFailure',
+                     "-o",'APT::Update::Auth-Failure::=touch /tmp/authFailure2',
                     ] + apt_args,
                     stdout=stdout, stderr=stderr)
          self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg"),
                       "The gpg file disappeared, this should not happen")
          self.assert_(os.path.exists("/var/lib/apt/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages"),
                       "The Packages file disappeared, this should not happen")
-         self.assert_(os.path.exists("/tmp/authFailure"),
-                      "The APT::Update::Auth-Failure script did not run")
+         self.assert_(os.path.exists("/tmp/authFailure2"),
+                      "The APT::Update::Auth-Failure script did not run (2)")
      def testRepositorySigGood(self):
          """
          test that a regular repository with good data stays good
@@@ -247,5 -248,5 +248,5 @@@ if __name__ == "__main__"
          stderr = sys.stderr
      
      # run only one for now
 -    unittest.main(defaultTest="testAptAuthenticationReliability")
 -    #unittest.main()
 +    #unittest.main(defaultTest="testAptAuthenticationReliability")
 +    unittest.main()