summaryrefslogtreecommitdiff
path: root/test/testvol
Commit message (Collapse)AuthorAge
* Replace deprecated ioutilChris Evich2022-09-20
| | | | | | | | | | Package `io/ioutil` was deprecated in golang 1.16, preventing podman from building under Fedora 37. Fortunately, functionality identical replacements are provided by the packages `io` and `os`. Replace all usage of all `io/ioutil` symbols with appropriate substitutions according to the golang docs. Signed-off-by: Chris Evich <cevich@redhat.com>
* Fix stuttersDaniel J Walsh2022-09-10
| | | | | | | | | | | | | | Podman adds an Error: to every error message. So starting an error message with "error" ends up being reported to the user as Error: error ... This patch removes the stutter. Also ioutil.ReadFile errors report the Path, so wrapping the err message with the path causes a stutter. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add support for containers.conf volume timeoutsMatthew Heon2022-08-23
| | | | | | | | | | | | | | | | | | | | | | | | Also, do a general cleanup of all the timeout code. Changes include: - Convert from int to *uint where possible. Timeouts cannot be negative, hence the uint change; and a timeout of 0 is valid, so we need a new way to detect that the user set a timeout (hence, pointer). - Change name in the database to avoid conflicts between new data type and old one. This will cause timeouts set with 4.2.0 to be lost, but considering nobody is using the feature at present (and the lack of validation means we could have invalid, negative timeouts in the DB) this feels safe. - Ensure volume plugin timeouts can only be used with volumes created using a plugin. Timeouts on the local driver are nonsensical. - Remove the existing test, as it did not use a volume plugin. Write a new test that does. The actual plumbing of the containers.conf timeout in is one line in volume_api.go; the remainder are the above-described cleanups. Signed-off-by: Matthew Heon <mheon@redhat.com>
* hack/test/utils: switch to golang native error wrappingSascha Grunert2022-07-05
| | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* fix buildValentin Rothberg2022-07-01
| | | | | | | | | PR containers/podman/pull/14449 had an outdated base. Merging it broke builds. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* test/testvol: rework testvol binaryPaul Holzinger2022-06-23
| | | | | | | | | | | | | | | | | | 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 <pholzing@redhat.com>
* test/testvol: update container image golang to 1.18Paul Holzinger2022-06-23
| | | | | | | | | | | Update the golang verion for the testvol image to the latest version 1.18. This requires us to build with GO111MODULE=off. Use the FQDN to prevent the shortnames prompt. Also add --network none to the podman build command to make sure we are only using the copied deps and nothing else. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* test/testvol: move Containerfile into testvol dirPaul Holzinger2022-06-23
| | | | | | | | | | | I think it is confusion to have this Containerfile in the repo root. It is used for the tests only so we should move it into the same dir. Also adapt the Makefile target to use the new path and add the current date as tag instead of using latest which can break CI easily when we have to update the image. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #13978 from Luap99/unparamOpenShift Merge Robot2022-04-25
|\ | | | | enable unparam linter
| * enable unparam linterPaul Holzinger2022-04-25
| | | | | | | | | | | | | | The unparam linter is useful to detect unused function parameters and return values. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | replace golint with revive linterPaul Holzinger2022-04-22
|/ | | | | | | | | | | | golint, scopelint and interfacer are deprecated. golint is replaced by revive. This linter is better because it will also check for our error style: `error strings should not be capitalized or end with punctuation or a newline` scopelint is replaced by exportloopref (already endabled) interfacer has no replacement but I do not think this linter is important. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* e2e tests: enable golintEd Santiago2021-11-29
| | | | | | ...and fix problems found therewith. Signed-off-by: Ed Santiago <santiago@redhat.com>
* standardize logrus messages to upper caseDaniel J Walsh2021-09-22
| | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* test/testvol/main.go: Fix missing arguments to Errorf()Raoul Bhatia2021-09-08
| | | | | | | | | | | | 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 <raoul.bhatia@radarcs.com>
* Add tests for volume pluginsMatthew Heon2021-01-14
This involves a new test binary (a basic implementation of the volume plugin protocol) and a new image on quay.io (Containerfile to produce it and all sources located in this commit). The image is used to run a containerized plugin we can test against. Signed-off-by: Matthew Heon <mheon@redhat.com>