diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-06-08 15:19:38 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2021-06-08 15:23:46 -0700 |
commit | 8e89d70713abd563602528d9a22d1ed1c1eb85e0 (patch) | |
tree | 7af1a2d93bd974c80061cfd487a6ae8923a95543 | |
parent | da1bade294025a419877484ae35f352984e804d2 (diff) | |
download | podman-8e89d70713abd563602528d9a22d1ed1c1eb85e0.tar.gz podman-8e89d70713abd563602528d9a22d1ed1c1eb85e0.tar.bz2 podman-8e89d70713abd563602528d9a22d1ed1c1eb85e0.zip |
[CI:DOCS] Update swagger for inspect network
struct for swagger was pointing to wrong internal type
Fixes #10559
Signed-off-by: Jhon Honce <jhonce@redhat.com>
-rw-r--r-- | pkg/api/handlers/libpod/swagger.go | 3 | ||||
-rw-r--r-- | pkg/api/server/register_networks.go | 4 | ||||
-rw-r--r-- | test/apiv2/python/rest_api/test_v2_0_0_image.py | 11 |
3 files changed, 14 insertions, 4 deletions
diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go index 2ac5009fc..6116a7274 100644 --- a/pkg/api/handlers/libpod/swagger.go +++ b/pkg/api/handlers/libpod/swagger.go @@ -4,6 +4,7 @@ import ( "net/http" "os" + "github.com/containernetworking/cni/libcni" "github.com/containers/image/v5/manifest" "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/api/handlers/utils" @@ -102,7 +103,7 @@ type swagNetworkRmReport struct { // swagger:response NetworkInspectReport type swagNetworkInspectReport struct { // in:body - Body entities.NetworkInspectReport + Body libcni.NetworkConfigList } // Network list diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 69c6896b8..cacf83a7f 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -281,7 +281,9 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // tags: // - networks // summary: Inspect a network - // description: Display low level configuration for a CNI network + // description: | + // Display low level configuration for a CNI network. + // - In a 200 response, all of the fields named Bytes are returned as a Base64 encoded string. // parameters: // - in: path // name: name diff --git a/test/apiv2/python/rest_api/test_v2_0_0_image.py b/test/apiv2/python/rest_api/test_v2_0_0_image.py index 2cd7bfa96..cea34e2e7 100644 --- a/test/apiv2/python/rest_api/test_v2_0_0_image.py +++ b/test/apiv2/python/rest_api/test_v2_0_0_image.py @@ -86,10 +86,17 @@ class ImageTestCase(APITestCase): self.assertTrue(keys["id"], "Expected to find id stanza") self.assertTrue(keys["images"], "Expected to find images stanza") self.assertTrue(keys["stream"], "Expected to find stream progress stanza's") + def test_create(self): - r = requests.post(self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8", timeout=15) + r = requests.post( + self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8", + timeout=15, + ) self.assertEqual(r.status_code, 200, r.text) - r = requests.post(self.podman_url + "/v1.40/images/create?fromSrc=-&repo=fedora&message=testing123", timeout=15) + r = requests.post( + self.podman_url + "/v1.40/images/create?fromSrc=-&repo=fedora&message=testing123", + timeout=15, + ) self.assertEqual(r.status_code, 200, r.text) def test_search_compat(self): |