From 6e8953abfc4693937c73e22ca6eddebf909d4d93 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 22 Jun 2022 14:34:32 +0200 Subject: test/testvol: rework testvol binary Add 4 new subcommands to the testvol binary, instead of just serving the volume api it now also can create/list/remove plugins. This is required to test new functionality where volumes are create outside of podman in the plugin. Podman should then be able to pick up the new volumes. The new testvol commands are: - serve: serve the podman api like the the testvol command before - create: create a volume with the given name - list: list all volume names - remove: remove the volume with the given name Also make a small update to the testvol Containerfile so that it can build correctly. Signed-off-by: Paul Holzinger --- test/testvol/Containerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/testvol/Containerfile') diff --git a/test/testvol/Containerfile b/test/testvol/Containerfile index de44798fe..32448f5a9 100644 --- a/test/testvol/Containerfile +++ b/test/testvol/Containerfile @@ -1,10 +1,9 @@ FROM docker.io/library/golang:1.18-alpine AS build-img -COPY ./test/testvol/ /go/src/github.com/containers/podman/cmd/testvol/ -COPY ./vendor /go/src/github.com/containers/podman/vendor/ +COPY ./ /go/src/github.com/containers/podman/ WORKDIR /go/src/github.com/containers/podman -RUN GO111MODULE=off go build -o /testvol ./cmd/testvol +RUN GO111MODULE=off go build -o /testvol ./test/testvol FROM alpine COPY --from=build-img /testvol /usr/local/bin WORKDIR / -ENTRYPOINT ["/usr/local/bin/testvol"] +ENTRYPOINT ["/usr/local/bin/testvol", "serve"] -- cgit v1.2.3-54-g00ecf