From 233ad2528f48d28fbc74d3b5c2fb4a82a9479f32 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 1 Mar 2015 19:56:47 +0300 Subject: [PATCH] Update system tests for new publishing APIs. #116 --- system/t12_api/publish.py | 5 +++-- system/t12_api/snapshots.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/system/t12_api/publish.py b/system/t12_api/publish.py index ae09bf26..3a02e1fb 100644 --- a/system/t12_api/publish.py +++ b/system/t12_api/publish.py @@ -11,7 +11,7 @@ DefaultSigningOptions = { class PublishAPITestRepo(APITest): """ - POST /publish/:prefix/repos + POST /publish/:prefix (local repos) """ fixtureGpg = True @@ -28,8 +28,9 @@ class PublishAPITestRepo(APITest): self.check_equal(self.post("/api/repos/" + repo_name + "/file/" + d).status_code, 200) prefix = self.random_name() - resp = self.post("/api/publish/" + prefix + "/repos", + resp = self.post("/api/publish/" + prefix, json={ + "SourceKind": "local", "Sources": [{"Name": repo_name}], "Signing": DefaultSigningOptions, }) diff --git a/system/t12_api/snapshots.py b/system/t12_api/snapshots.py index 2f3048b2..c0ca8e8c 100644 --- a/system/t12_api/snapshots.py +++ b/system/t12_api/snapshots.py @@ -186,8 +186,9 @@ class SnapshotsAPITestCreateDelete(APITest): self.check_equal(self.get("/api/snapshots/" + snap1).status_code, 404) # deleting published snapshot - resp = self.post("/api/publish/./snapshots", + resp = self.post("/api/publish", json={ + "SourceKind": "snapshot", "Distribution": "trusty", "Architectures": ["i386"], "Sources": [{"Name": snap2}],