Skip to content

Commit bc0a5fb

Browse files
authored
test: use anonymous volume for prune (#3051)
This is related to moby/moby#44216 Prunes will, by default, no longer prune named volumes, only anonymous ones. Signed-off-by: Brian Goff <[email protected]>
1 parent 923e067 commit bc0a5fb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/integration/api_volume_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ def test_force_remove_volume(self):
5757

5858
@requires_api_version('1.25')
5959
def test_prune_volumes(self):
60-
name = 'hopelessmasquerade'
61-
self.client.create_volume(name)
62-
self.tmp_volumes.append(name)
60+
v = self.client.create_volume()
61+
self.tmp_volumes.append(v["Name"])
6362
result = self.client.prune_volumes()
64-
assert name in result['VolumesDeleted']
63+
assert v["Name"] in result['VolumesDeleted']
6564

6665
def test_remove_nonexistent_volume(self):
6766
name = 'shootthebullet'

0 commit comments

Comments
 (0)