Merge pull request #11477 from raoulbhatia/fix-testvol-error

test/testvol/main.go: Fix missing arguments to Errorf()
This commit is contained in:
OpenShift Merge Robot 2021-09-08 13:18:20 +02:00 committed by GitHub
commit 180a3c42d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -224,13 +224,13 @@ func (d *DirDriver) Remove(req *volume.RemoveRequest) error {
vol, exists := d.volumes[req.Name] vol, exists := d.volumes[req.Name]
if !exists { if !exists {
logrus.Debugf("Did not find volume %s", req.Name) logrus.Debugf("Did not find volume %s", req.Name)
return errors.Errorf("no volume with name %s found") return errors.Errorf("no volume with name %s found", req.Name)
} }
logrus.Debugf("Found volume %s", req.Name) logrus.Debugf("Found volume %s", req.Name)
if len(vol.mounts) > 0 { if len(vol.mounts) > 0 {
logrus.Debugf("Cannot remove %s, is mounted", req.Name) logrus.Debugf("Cannot remove %s, is mounted", req.Name)
return errors.Errorf("volume %s is mounted and cannot be removed") return errors.Errorf("volume %s is mounted and cannot be removed", req.Name)
} }
delete(d.volumes, req.Name) delete(d.volumes, req.Name)