summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Goff <cpuguy83@gmail.com>2022-10-05 10:54:45 -0700
committerGitHub <noreply@github.com>2022-10-05 13:54:45 -0400
commitbc0a5fbacd7617fd338d121adca61600fc70d221 (patch)
treedbd6b10880fff6781cdd293df91a3377eafa9191
parent923e067dddc3d4b86e4e620a99fcdcdafbd17a98 (diff)
downloaddocker-py-bc0a5fbacd7617fd338d121adca61600fc70d221.tar.gz
test: use anonymous volume for prune (#3051)
This is related to https://github.com/moby/moby/pull/44216 Prunes will, by default, no longer prune named volumes, only anonymous ones. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
-rw-r--r--tests/integration/api_volume_test.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/integration/api_volume_test.py b/tests/integration/api_volume_test.py
index 8e7dd3a..2085e83 100644
--- a/tests/integration/api_volume_test.py
+++ b/tests/integration/api_volume_test.py
@@ -57,11 +57,10 @@ class TestVolumes(BaseAPIIntegrationTest):
@requires_api_version('1.25')
def test_prune_volumes(self):
- name = 'hopelessmasquerade'
- self.client.create_volume(name)
- self.tmp_volumes.append(name)
+ v = self.client.create_volume()
+ self.tmp_volumes.append(v["Name"])
result = self.client.prune_volumes()
- assert name in result['VolumesDeleted']
+ assert v["Name"] in result['VolumesDeleted']
def test_remove_nonexistent_volume(self):
name = 'shootthebullet'