@@ -283,14 +283,14 @@ func mountBlockDevice(t *testing.T, m *LinuxFilesystem, partition string) error
283
283
mountPath := filepath .Join (os .TempDir (), fmt .Sprintf ("%s-mount-path-%d" , driverName , time .Now ().Unix ()))
284
284
defer os .RemoveAll (mountPath )
285
285
286
- return mount (t , m , partition , mountPath , "bind" )
286
+ return mount (t , m , partition , mountPath , "" , " bind" )
287
287
}
288
288
289
- func mount (t * testing.T , m * LinuxFilesystem , source , target , fsType string ) error {
289
+ func mount (t * testing.T , m * LinuxFilesystem , source , target , fsType string , opts ... string ) error {
290
290
t .Helper ()
291
291
292
- if err := m .Mount (context .Background (), source , target , fsType ); err != nil {
293
- return fmt .Errorf ("Mount failed with error: %w" , err )
292
+ if err := m .Mount (context .Background (), source , target , fsType , opts ... ); err != nil {
293
+ return fmt .Errorf ("Mount %s %s => %s failed with error: %w" , fsType , source , target , err )
294
294
}
295
295
isMounted , err := m .IsMounted (context .Background (), target )
296
296
if err != nil {
0 commit comments