Skip to content

Commit cbbc37a

Browse files
committed
Clean up created volume from test_run_with_named_volume
This fix adds the volume id to the list so that it could be cleaned up on test teardown. The issue was originally from moby/moby#36292 where an additional `somevolume` pre-exists in tests. Signed-off-by: Yong Tang <[email protected]>
1 parent 14eec99 commit cbbc37a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/integration/models_containers_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ def test_run_with_volume(self):
5555

5656
def test_run_with_named_volume(self):
5757
client = docker.from_env(version=TEST_API_VERSION)
58-
client.volumes.create(name="somevolume")
58+
volume = client.volumes.create(name="somevolume")
59+
self.tmp_volumes.append(volume.id)
5960

6061
container = client.containers.run(
6162
"alpine", "sh -c 'echo \"hello\" > /insidecontainer/test'",

0 commit comments

Comments
 (0)