summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-11 05:38:35 -0500
committerGitHub <noreply@github.com>2021-02-11 05:38:35 -0500
commitafe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (patch)
tree3ed22e8ec7e295ce95523762bf2b76eabada70c1 /test
parentca354f13f28896351e910da72f946e21bac2c6b0 (diff)
parentf28b08fe969b90f6823ec3001cc7472738a1bffc (diff)
downloadpodman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.tar.gz
podman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.tar.bz2
podman-afe4ce6b1ce6a5ba21472f51defd243bdd7750b3.zip
Merge pull request #9312 from baude/issue9310
Correct compat network prune response
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/rest_api/test_rest_v2_0_0.py8
1 files changed, 8 insertions, 0 deletions
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 73db35cc1..05c24f2ea 100644
--- a/test/apiv2/rest_api/test_rest_v2_0_0.py
+++ b/test/apiv2/rest_api/test_rest_v2_0_0.py
@@ -483,8 +483,16 @@ class TestApi(unittest.TestCase):
inspect = requests.get(PODMAN_URL + f"/v1.40/networks/{ident}")
self.assertEqual(inspect.status_code, 404, inspect.content)
+ # network prune
+ prune_name = "Network_" + "".join(random.choice(string.ascii_letters) for i in range(10))
+ prune_create = requests.post(PODMAN_URL + "/v1.40/networks/create", json={"Name": prune_name})
+ self.assertEqual(create.status_code, 201, prune_create.content)
+
prune = requests.post(PODMAN_URL + "/v1.40/networks/prune")
self.assertEqual(prune.status_code, 200, prune.content)
+ obj = json.loads(prune.content)
+ self.assertTrue(prune_name in obj["NetworksDeleted"])
+
def test_volumes_compat(self):
name = "Volume_" + "".join(random.choice(string.ascii_letters) for i in range(10))