Skip to content

Commit

Permalink
correct go-binding key for volumes
Browse files Browse the repository at this point in the history
the go binding for remove container was using 'vols' for a key to remove volumes associated to the container.  the correct key should be "v" and is documented as such.

Fixes: containers#7128

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude committed Aug 4, 2020
1 parent d4cf3c5 commit 7590a41
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/bindings/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func Remove(ctx context.Context, nameOrID string, force, volumes *bool) error {
params.Set("force", strconv.FormatBool(*force))
}
if volumes != nil {
params.Set("vols", strconv.FormatBool(*volumes))
params.Set("v", strconv.FormatBool(*volumes))
}
response, err := conn.DoRequest(nil, http.MethodDelete, "/containers/%s", params, nil, nameOrID)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions test/system/160-volumes.bats
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ EOF

# Anonymous temporary volumes, and persistent autocreated named ones
@test "podman volume, implicit creation with run" {
skip_if_remote "FIXME: pending #7128"

# No hostdir arg: create anonymous container with random name
rand=$(random_string)
run_podman run -v /myvol $IMAGE sh -c "echo $rand >/myvol/myfile"
Expand Down

0 comments on commit 7590a41

Please sign in to comment.