mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
+29
-29
@@ -10,11 +10,11 @@ class MirrorsAPITestCreateShow(APITest):
|
||||
|
||||
def check(self):
|
||||
mirror_name = self.random_name()
|
||||
mirror_desc = {u'Name': mirror_name,
|
||||
u'ArchiveURL': 'http://security.debian.org/',
|
||||
u'Architectures': ['amd64'],
|
||||
u'Components': ['main'],
|
||||
u'Distribution': 'wheezy/updates'}
|
||||
mirror_desc = {'Name': mirror_name,
|
||||
'ArchiveURL': 'http://security.debian.org/',
|
||||
'Architectures': ['amd64'],
|
||||
'Components': ['main'],
|
||||
'Distribution': 'wheezy/updates'}
|
||||
|
||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
||||
self.check_equal(resp.status_code, 400)
|
||||
@@ -22,17 +22,17 @@ class MirrorsAPITestCreateShow(APITest):
|
||||
'error': 'unable to fetch mirror: verification of detached signature failed: exit status 2',
|
||||
}, resp.json())
|
||||
|
||||
mirror_desc[u'IgnoreSignatures'] = True
|
||||
mirror_desc['IgnoreSignatures'] = True
|
||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
||||
self.check_equal(resp.status_code, 201)
|
||||
|
||||
resp = self.get("/api/mirrors/" + mirror_name)
|
||||
self.check_equal(resp.status_code, 200)
|
||||
self.check_subset({u'Name': mirror_name,
|
||||
u'ArchiveRoot': 'http://security.debian.org/',
|
||||
u'Architectures': ['amd64'],
|
||||
u'Components': ['main'],
|
||||
u'Distribution': 'wheezy/updates'}, resp.json())
|
||||
self.check_subset({'Name': mirror_name,
|
||||
'ArchiveRoot': 'http://security.debian.org/',
|
||||
'Architectures': ['amd64'],
|
||||
'Components': ['main'],
|
||||
'Distribution': 'wheezy/updates'}, resp.json())
|
||||
|
||||
resp = self.get("/api/mirrors/" + mirror_desc["Name"] + "/packages")
|
||||
self.check_equal(resp.status_code, 404)
|
||||
@@ -44,12 +44,12 @@ class MirrorsAPITestCreateUpdate(APITest):
|
||||
"""
|
||||
def check(self):
|
||||
mirror_name = self.random_name()
|
||||
mirror_desc = {u'Name': mirror_name,
|
||||
u'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
u'Distribution': 'wheezy',
|
||||
u'Components': ['main']}
|
||||
mirror_desc = {'Name': mirror_name,
|
||||
'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
'Distribution': 'wheezy',
|
||||
'Components': ['main']}
|
||||
|
||||
mirror_desc[u'IgnoreSignatures'] = True
|
||||
mirror_desc['IgnoreSignatures'] = True
|
||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
||||
self.check_equal(resp.status_code, 201)
|
||||
|
||||
@@ -68,9 +68,9 @@ class MirrorsAPITestCreateUpdate(APITest):
|
||||
|
||||
resp = self.get("/api/mirrors/" + mirror_desc["Name"])
|
||||
self.check_equal(resp.status_code, 200)
|
||||
self.check_subset({u'Name': mirror_desc["Name"],
|
||||
u'ArchiveRoot': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
u'Distribution': 'wheezy'}, resp.json())
|
||||
self.check_subset({'Name': mirror_desc["Name"],
|
||||
'ArchiveRoot': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
'Distribution': 'wheezy'}, resp.json())
|
||||
|
||||
resp = self.get("/api/mirrors/" + mirror_desc["Name"] + "/packages")
|
||||
self.check_equal(resp.status_code, 200)
|
||||
@@ -82,11 +82,11 @@ class MirrorsAPITestCreateDelete(APITest):
|
||||
"""
|
||||
def check(self):
|
||||
mirror_name = self.random_name()
|
||||
mirror_desc = {u'Name': mirror_name,
|
||||
u'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
u'IgnoreSignatures': True,
|
||||
u'Distribution': 'wheezy',
|
||||
u'Components': ['main']}
|
||||
mirror_desc = {'Name': mirror_name,
|
||||
'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
'IgnoreSignatures': True,
|
||||
'Distribution': 'wheezy',
|
||||
'Components': ['main']}
|
||||
|
||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
||||
self.check_equal(resp.status_code, 201)
|
||||
@@ -105,11 +105,11 @@ class MirrorsAPITestCreateList(APITest):
|
||||
count = len(resp.json())
|
||||
|
||||
mirror_name = self.random_name()
|
||||
mirror_desc = {u'Name': mirror_name,
|
||||
u'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
u'IgnoreSignatures': True,
|
||||
u'Distribution': 'wheezy',
|
||||
u'Components': ['main']}
|
||||
mirror_desc = {'Name': mirror_name,
|
||||
'ArchiveURL': 'https://packagecloud.io/varnishcache/varnish30/debian/',
|
||||
'IgnoreSignatures': True,
|
||||
'Distribution': 'wheezy',
|
||||
'Components': ['main']}
|
||||
|
||||
resp = self.post("/api/mirrors", json=mirror_desc)
|
||||
self.check_equal(resp.status_code, 201)
|
||||
|
||||
Reference in New Issue
Block a user