@@ -222,45 +222,45 @@ func TestGetBtrfsDevice(t *testing.T) {
222222 expectedDevice string
223223 expectedError string
224224 root string
225- mounts []* mountinfo.Info
225+ mounts []mountinfo.Info
226226 }{
227227 {
228228 expectedDevice : "/dev/loop0" ,
229229 root : "/var/lib/containerd/snapshot/btrfs" ,
230- mounts : []* mountinfo.Info {
231- {Root : "/" , Mountpoint : "/" , Fstype : "ext4" , Source : "/dev/sda1" },
232- {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , Fstype : "btrfs" , Source : "/dev/loop0" },
230+ mounts : []mountinfo.Info {
231+ {Root : "/" , Mountpoint : "/" , FSType : "ext4" , Source : "/dev/sda1" },
232+ {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , FSType : "btrfs" , Source : "/dev/loop0" },
233233 },
234234 },
235235 {
236236 expectedError : "/var/lib/containerd/snapshot/btrfs is not mounted as btrfs" ,
237237 root : "/var/lib/containerd/snapshot/btrfs" ,
238- mounts : []* mountinfo.Info {
239- {Root : "/" , Mountpoint : "/" , Fstype : "ext4" , Source : "/dev/sda1" },
238+ mounts : []mountinfo.Info {
239+ {Root : "/" , Mountpoint : "/" , FSType : "ext4" , Source : "/dev/sda1" },
240240 },
241241 },
242242 {
243243 expectedDevice : "/dev/sda1" ,
244244 root : "/var/lib/containerd/snapshot/btrfs" ,
245- mounts : []* mountinfo.Info {
246- {Root : "/" , Mountpoint : "/" , Fstype : "btrfs" , Source : "/dev/sda1" },
245+ mounts : []mountinfo.Info {
246+ {Root : "/" , Mountpoint : "/" , FSType : "btrfs" , Source : "/dev/sda1" },
247247 },
248248 },
249249 {
250250 expectedDevice : "/dev/sda2" ,
251251 root : "/var/lib/containerd/snapshot/btrfs" ,
252- mounts : []* mountinfo.Info {
253- {Root : "/" , Mountpoint : "/" , Fstype : "btrfs" , Source : "/dev/sda1" },
254- {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , Fstype : "btrfs" , Source : "/dev/sda2" },
252+ mounts : []mountinfo.Info {
253+ {Root : "/" , Mountpoint : "/" , FSType : "btrfs" , Source : "/dev/sda1" },
254+ {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , FSType : "btrfs" , Source : "/dev/sda2" },
255255 },
256256 },
257257 {
258258 expectedDevice : "/dev/sda2" ,
259259 root : "/var/lib/containerd/snapshot/btrfs" ,
260- mounts : []* mountinfo.Info {
261- {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , Fstype : "btrfs" , Source : "/dev/sda2" },
262- {Root : "/" , Mountpoint : "/var/lib/foooooooooooooooooooo/baaaaaaaaaaaaaaaaaaaar" , Fstype : "btrfs" , Source : "/dev/sda3" }, // mountpoint length longer than /var/lib/containerd/snapshot/btrfs
263- {Root : "/" , Mountpoint : "/" , Fstype : "btrfs" , Source : "/dev/sda1" },
260+ mounts : []mountinfo.Info {
261+ {Root : "/" , Mountpoint : "/var/lib/containerd/snapshot/btrfs" , FSType : "btrfs" , Source : "/dev/sda2" },
262+ {Root : "/" , Mountpoint : "/var/lib/foooooooooooooooooooo/baaaaaaaaaaaaaaaaaaaar" , FSType : "btrfs" , Source : "/dev/sda3" }, // mountpoint length longer than /var/lib/containerd/snapshot/btrfs
263+ {Root : "/" , Mountpoint : "/" , FSType : "btrfs" , Source : "/dev/sda1" },
264264 },
265265 },
266266 }
0 commit comments