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>
This commit is contained in:
Brian Goff 2022-10-05 10:54:45 -07:00 committed by GitHub
parent 923e067ddd
commit bc0a5fbacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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'