mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
New upstream version 1.5.0+ds1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Testing serving public repo
|
||||
"""
|
||||
|
||||
import httplib
|
||||
import http.client
|
||||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
@@ -16,6 +16,7 @@ class RootDirInaccessible(BaseTest):
|
||||
"""
|
||||
serve command aborts if rootDir is inaccessible
|
||||
"""
|
||||
skipTest = 'User is root' if os.environ['USER'] == 'root' else False
|
||||
fixtureDB = False
|
||||
fixturePool = False
|
||||
|
||||
@@ -49,7 +50,7 @@ class Serve1Test(BaseTest):
|
||||
try:
|
||||
time.sleep(1)
|
||||
|
||||
conn = httplib.HTTPConnection("127.0.0.1", 8765)
|
||||
conn = http.client.HTTPConnection("127.0.0.1", 8765)
|
||||
conn.request("GET", "/")
|
||||
r = conn.getresponse()
|
||||
if r.status != 200:
|
||||
@@ -65,7 +66,7 @@ class Serve1Test(BaseTest):
|
||||
if proc.returncode != -2 and proc.returncode != 2:
|
||||
raise Exception("exit code %d != %d (output: %s)" % (proc.returncode, -2, output))
|
||||
self.output = output
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise Exception("Running command %s failed: %s" % (self.runCmd, str(e)))
|
||||
|
||||
def check(self):
|
||||
|
||||
Reference in New Issue
Block a user