@@ -16,7 +16,6 @@ import (
1616 "testing"
1717 "time"
1818
19- "github.com/docker/docker/api/types"
2019 "github.com/docker/docker/api/types/container"
2120 "github.com/docker/docker/api/types/mount"
2221 "github.com/docker/docker/api/types/network"
@@ -1807,7 +1806,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18071806
18081807 type testCase struct {
18091808 spec mount.Mount
1810- expected types .MountPoint
1809+ expected container .MountPoint
18111810 }
18121811
18131812 var selinuxSharedLabel string
@@ -1820,23 +1819,23 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18201819 // Validation of the actual `Mount` struct is done in another test is not needed here
18211820 {
18221821 spec : mount.Mount {Type : "volume" , Target : destPath },
1823- expected : types .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1822+ expected : container .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
18241823 },
18251824 {
18261825 spec : mount.Mount {Type : "volume" , Target : destPath + slash },
1827- expected : types .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1826+ expected : container .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
18281827 },
18291828 {
18301829 spec : mount.Mount {Type : "volume" , Target : destPath , Source : "test1" },
1831- expected : types .MountPoint {Type : "volume" , Name : "test1" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1830+ expected : container .MountPoint {Type : "volume" , Name : "test1" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
18321831 },
18331832 {
18341833 spec : mount.Mount {Type : "volume" , Target : destPath , ReadOnly : true , Source : "test2" },
1835- expected : types .MountPoint {Type : "volume" , Name : "test2" , RW : false , Destination : destPath , Mode : selinuxSharedLabel },
1834+ expected : container .MountPoint {Type : "volume" , Name : "test2" , RW : false , Destination : destPath , Mode : selinuxSharedLabel },
18361835 },
18371836 {
18381837 spec : mount.Mount {Type : "volume" , Target : destPath , Source : "test3" , VolumeOptions : & mount.VolumeOptions {DriverConfig : & mount.Driver {Name : volume .DefaultDriverName }}},
1839- expected : types .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , Name : "test3" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1838+ expected : container .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , Name : "test3" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
18401839 },
18411840 }
18421841
@@ -1852,7 +1851,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18521851 Source : tmpDir1 ,
18531852 Target : destPath ,
18541853 },
1855- expected : types .MountPoint {
1854+ expected : container .MountPoint {
18561855 Type : "bind" ,
18571856 RW : true ,
18581857 Destination : destPath ,
@@ -1861,7 +1860,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18611860 },
18621861 {
18631862 spec : mount.Mount {Type : "bind" , Source : tmpDir1 , Target : destPath , ReadOnly : true },
1864- expected : types .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir1 },
1863+ expected : container .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir1 },
18651864 },
18661865 }... )
18671866
@@ -1875,15 +1874,15 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18751874 cases = append (cases , []testCase {
18761875 {
18771876 spec : mount.Mount {Type : "bind" , Source : tmpDir3 , Target : destPath },
1878- expected : types .MountPoint {Type : "bind" , RW : true , Destination : destPath , Source : tmpDir3 },
1877+ expected : container .MountPoint {Type : "bind" , RW : true , Destination : destPath , Source : tmpDir3 },
18791878 },
18801879 {
18811880 spec : mount.Mount {Type : "bind" , Source : tmpDir3 , Target : destPath , ReadOnly : true },
1882- expected : types .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir3 },
1881+ expected : container .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir3 },
18831882 },
18841883 {
18851884 spec : mount.Mount {Type : "bind" , Source : tmpDir3 , Target : destPath , ReadOnly : true , BindOptions : & mount.BindOptions {Propagation : "shared" }},
1886- expected : types .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir3 , Propagation : "shared" },
1885+ expected : container .MountPoint {Type : "bind" , RW : false , Destination : destPath , Source : tmpDir3 , Propagation : "shared" },
18871886 },
18881887 }... )
18891888 }
@@ -1894,19 +1893,19 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
18941893 cases = append (cases , []testCase {
18951894 {
18961895 spec : mount.Mount {Type : "volume" , Target : destPath , VolumeOptions : & mount.VolumeOptions {NoCopy : true }},
1897- expected : types .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1896+ expected : container .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
18981897 },
18991898 {
19001899 spec : mount.Mount {Type : "volume" , Target : destPath + slash , VolumeOptions : & mount.VolumeOptions {NoCopy : true }},
1901- expected : types .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1900+ expected : container .MountPoint {Driver : volume .DefaultDriverName , Type : "volume" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
19021901 },
19031902 {
19041903 spec : mount.Mount {Type : "volume" , Target : destPath , Source : "test4" , VolumeOptions : & mount.VolumeOptions {NoCopy : true }},
1905- expected : types .MountPoint {Type : "volume" , Name : "test4" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
1904+ expected : container .MountPoint {Type : "volume" , Name : "test4" , RW : true , Destination : destPath , Mode : selinuxSharedLabel },
19061905 },
19071906 {
19081907 spec : mount.Mount {Type : "volume" , Target : destPath , Source : "test5" , ReadOnly : true , VolumeOptions : & mount.VolumeOptions {NoCopy : true }},
1909- expected : types .MountPoint {Type : "volume" , Name : "test5" , RW : false , Destination : destPath , Mode : selinuxSharedLabel },
1908+ expected : container .MountPoint {Type : "volume" , Name : "test5" , RW : false , Destination : destPath , Mode : selinuxSharedLabel },
19101909 },
19111910 }... )
19121911 }
0 commit comments