summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-04-12 09:33:51 -0700
committerMatthew Heon <mheon@redhat.com>2021-04-16 11:40:27 -0400
commitf218d8849dd27d13a990bf998e64a40169e8674c (patch)
tree25545a359d0b59b0a93f11e00a90ea1ed7ef3dd6
parent386300443b4b7acecba25809e4af3129d640aee5 (diff)
downloadpodman-f218d8849dd27d13a990bf998e64a40169e8674c.tar.gz
podman-f218d8849dd27d13a990bf998e64a40169e8674c.tar.bz2
podman-f218d8849dd27d13a990bf998e64a40169e8674c.zip
[CI:DOCS] Correct status code for /pods/create
Swagger documentation reported that the API endpoint /pods/create returned 200 while the as-built code returned 201. 201 is more correct so documentation updated. Tests already checked for 201 so no updated needed. Signed-off-by: Jhon Honce <jhonce@redhat.com>
-rw-r--r--pkg/api/server/register_pods.go2
-rw-r--r--test/apiv2/rest_api/test_rest_v2_0_0.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go
index c66cc48ff..d0887aada 100644
--- a/pkg/api/server/register_pods.go
+++ b/pkg/api/server/register_pods.go
@@ -38,7 +38,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// schema:
// $ref: "#/definitions/PodSpecGenerator"
// responses:
- // 200:
+ // 201:
// schema:
// $ref: "#/definitions/IdResponse"
// 400:
diff --git a/test/apiv2/rest_api/test_rest_v2_0_0.py b/test/apiv2/rest_api/test_rest_v2_0_0.py
index d7910f555..9924bd65e 100644
--- a/test/apiv2/rest_api/test_rest_v2_0_0.py
+++ b/test/apiv2/rest_api/test_rest_v2_0_0.py
@@ -728,5 +728,6 @@ class TestApi(unittest.TestCase):
self.assertGreater(len(start["Errs"]), 0, r.text)
+
if __name__ == "__main__":
unittest.main()