Skip to content

Commit

Permalink
test/testvol/main.go: Fix missing arguments to Errorf()
Browse files Browse the repository at this point in the history
go test -v -p 1 -tags apparmor,ostree,seccomp,selinux,systemd github.com/containers/podman/v2/test/testvol
results in the following error:

> test/testvol/main.go:227:10: Errorf format %s reads arg #1, but call has 0 args
> test/testvol/main.go:233:10: Errorf format %s reads arg #1, but call has 0 args

This patch passes req.Name as an argument to the Errorf() call

Signed-off-by: Raoul Bhatia <[email protected]>
  • Loading branch information
raoulbhatia committed Sep 8, 2021
1 parent cd43cf8 commit aa412cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/testvol/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ func (d *DirDriver) Remove(req *volume.RemoveRequest) error {
vol, exists := d.volumes[req.Name]
if !exists {
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)

if len(vol.mounts) > 0 {
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)
Expand Down

0 comments on commit aa412cc

Please sign in to comment.