@@ -956,46 +956,46 @@ func (fv *FakeVolume) TearDownAt(dir string) error {
956
956
}
957
957
958
958
// Block volume support
959
- func (fv * FakeVolume ) SetUpDevice () error {
959
+ func (fv * FakeVolume ) SetUpDevice () ( string , error ) {
960
960
fv .Lock ()
961
961
defer fv .Unlock ()
962
962
if fv .VolName == TimeoutOnMountDeviceVolumeName {
963
963
fv .DeviceMountState [fv .VolName ] = deviceMountUncertain
964
- return volumetypes .NewUncertainProgressError ("mount failed" )
964
+ return "" , volumetypes .NewUncertainProgressError ("mount failed" )
965
965
}
966
966
if fv .VolName == FailMountDeviceVolumeName {
967
967
fv .DeviceMountState [fv .VolName ] = deviceNotMounted
968
- return fmt .Errorf ("error mapping disk: %s" , fv .VolName )
968
+ return "" , fmt .Errorf ("error mapping disk: %s" , fv .VolName )
969
969
}
970
970
971
971
if fv .VolName == TimeoutAndFailOnMountDeviceVolumeName {
972
972
_ , ok := fv .DeviceMountState [fv .VolName ]
973
973
if ! ok {
974
974
fv .DeviceMountState [fv .VolName ] = deviceMountUncertain
975
- return volumetypes .NewUncertainProgressError ("timed out mounting error" )
975
+ return "" , volumetypes .NewUncertainProgressError ("timed out mounting error" )
976
976
}
977
977
fv .DeviceMountState [fv .VolName ] = deviceNotMounted
978
- return fmt .Errorf ("error mapping disk: %s" , fv .VolName )
978
+ return "" , fmt .Errorf ("error mapping disk: %s" , fv .VolName )
979
979
}
980
980
981
981
if fv .VolName == SuccessAndTimeoutDeviceName {
982
982
_ , ok := fv .DeviceMountState [fv .VolName ]
983
983
if ok {
984
984
fv .DeviceMountState [fv .VolName ] = deviceMountUncertain
985
- return volumetypes .NewUncertainProgressError ("error mounting state" )
985
+ return "" , volumetypes .NewUncertainProgressError ("error mounting state" )
986
986
}
987
987
}
988
988
if fv .VolName == SuccessAndFailOnMountDeviceName {
989
989
_ , ok := fv .DeviceMountState [fv .VolName ]
990
990
if ok {
991
- return fmt .Errorf ("error mapping disk: %s" , fv .VolName )
991
+ return "" , fmt .Errorf ("error mapping disk: %s" , fv .VolName )
992
992
}
993
993
}
994
994
995
995
fv .DeviceMountState [fv .VolName ] = deviceMounted
996
996
fv .SetUpDeviceCallCount ++
997
997
998
- return nil
998
+ return "" , nil
999
999
}
1000
1000
1001
1001
// Block volume support
0 commit comments