@@ -20,7 +20,6 @@ import (
2020 "context"
2121 "testing"
2222
23- "github.com/compose-spec/compose-go/v2/types"
2423 "github.com/docker/compose/v2/pkg/api"
2524 "github.com/docker/docker/api/types/container"
2625 "github.com/docker/docker/api/types/filters"
@@ -59,7 +58,6 @@ func TestVolumes(t *testing.T) {
5958 }
6059
6160 ctx := context .Background ()
62- project := & types.Project {Name : testProject }
6361 args := filters .NewArgs (projectFilter (testProject ))
6462 listOpts := container.ListOptions {Filters : args }
6563 volumeListArgs := filters .NewArgs (projectFilter (testProject ))
@@ -75,14 +73,14 @@ func TestVolumes(t *testing.T) {
7573
7674 // Test without service filter - should return all project volumes
7775 volumeOptions := api.VolumesOptions {}
78- volumes , err := tested .Volumes (ctx , project , volumeOptions )
76+ volumes , err := tested .Volumes (ctx , testProject , volumeOptions )
7977 expected := []api.VolumesSummary {vol1 , vol2 , vol3 }
8078 assert .NilError (t , err )
8179 assert .DeepEqual (t , volumes , expected )
8280
8381 // Test with service filter - should only return volumes used by service1
8482 volumeOptions = api.VolumesOptions {Services : []string {"service1" }}
85- volumes , err = tested .Volumes (ctx , project , volumeOptions )
83+ volumes , err = tested .Volumes (ctx , testProject , volumeOptions )
8684 expected = []api.VolumesSummary {vol1 , vol2 }
8785 assert .NilError (t , err )
8886 assert .DeepEqual (t , volumes , expected )
0 commit comments