mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-31 04:30:44 +00:00
Update system tests for new publishing APIs. #116
This commit is contained in:
@@ -11,7 +11,7 @@ DefaultSigningOptions = {
|
|||||||
|
|
||||||
class PublishAPITestRepo(APITest):
|
class PublishAPITestRepo(APITest):
|
||||||
"""
|
"""
|
||||||
POST /publish/:prefix/repos
|
POST /publish/:prefix (local repos)
|
||||||
"""
|
"""
|
||||||
fixtureGpg = True
|
fixtureGpg = True
|
||||||
|
|
||||||
@@ -28,8 +28,9 @@ class PublishAPITestRepo(APITest):
|
|||||||
self.check_equal(self.post("/api/repos/" + repo_name + "/file/" + d).status_code, 200)
|
self.check_equal(self.post("/api/repos/" + repo_name + "/file/" + d).status_code, 200)
|
||||||
|
|
||||||
prefix = self.random_name()
|
prefix = self.random_name()
|
||||||
resp = self.post("/api/publish/" + prefix + "/repos",
|
resp = self.post("/api/publish/" + prefix,
|
||||||
json={
|
json={
|
||||||
|
"SourceKind": "local",
|
||||||
"Sources": [{"Name": repo_name}],
|
"Sources": [{"Name": repo_name}],
|
||||||
"Signing": DefaultSigningOptions,
|
"Signing": DefaultSigningOptions,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -186,8 +186,9 @@ class SnapshotsAPITestCreateDelete(APITest):
|
|||||||
self.check_equal(self.get("/api/snapshots/" + snap1).status_code, 404)
|
self.check_equal(self.get("/api/snapshots/" + snap1).status_code, 404)
|
||||||
|
|
||||||
# deleting published snapshot
|
# deleting published snapshot
|
||||||
resp = self.post("/api/publish/./snapshots",
|
resp = self.post("/api/publish",
|
||||||
json={
|
json={
|
||||||
|
"SourceKind": "snapshot",
|
||||||
"Distribution": "trusty",
|
"Distribution": "trusty",
|
||||||
"Architectures": ["i386"],
|
"Architectures": ["i386"],
|
||||||
"Sources": [{"Name": snap2}],
|
"Sources": [{"Name": snap2}],
|
||||||
|
|||||||
Reference in New Issue
Block a user