@@ -26,6 +26,7 @@ import (
2626
2727 moby "github.com/docker/docker/api/types"
2828 "github.com/docker/docker/api/types/filters"
29+ "github.com/docker/docker/api/types/volume"
2930
3031 compose "github.com/docker/compose/v2/pkg/api"
3132 "github.com/docker/compose/v2/pkg/mocks"
@@ -48,6 +49,8 @@ func TestPs(t *testing.T) {
4849 c2 , inspect2 := containerDetails ("service1" , "456" , "running" , "" , 0 )
4950 c2 .Ports = []moby.Port {{PublicPort : 80 , PrivatePort : 90 , IP : "localhost" }}
5051 c3 , inspect3 := containerDetails ("service2" , "789" , "exited" , "" , 130 )
52+ api .EXPECT ().VolumeList (ctx , gomock .Any ()).Return (volume.VolumeListOKBody {}, nil )
53+ api .EXPECT ().NetworkList (ctx , gomock .Any ()).Return ([]moby.NetworkResource {}, nil )
5154 api .EXPECT ().ContainerList (ctx , listOpts ).Return ([]moby.Container {c1 , c2 , c3 }, nil )
5255 api .EXPECT ().ContainerInspect (anyCancellableContext (), "123" ).Return (inspect1 , nil )
5356 api .EXPECT ().ContainerInspect (anyCancellableContext (), "456" ).Return (inspect2 , nil )
0 commit comments