summaryrefslogtreecommitdiff
path: root/test/apiv2
Commit message (Collapse)AuthorAge
* Fix broken volume and container testsAlex Schultz2021-07-14
| | | | | | | | | There are a handful of tests that aren't actually being run because there are missing \ which is prevented the tests from being executed. Additionally some of the test syntax was incorrect but not showing up because these tests didn't run. Signed-off-by: Alex Schultz <aschultz@redhat.com>
* Implemented Until Query Parameter for Containers/logscdoern2021-07-09
| | | | | | | | compat containers/logs was missing actual usage of until query param. fixes #10859 Signed-off-by: cdoern <cdoern@redhat.com>
* Implement --archive flag for podman cpMatej Vasek2021-07-01
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Merge pull request #10756 from jmguzik/volume-prune-until-http-apiOpenShift Merge Robot2021-06-23
|\ | | | | Add support for volume prune until filter to http api
| * Add support for volume prune until filter to http apiJakub Guzik2021-06-22
| | | | | | | | | | | | | | | | As stated in #10579 docker silently implements until filter for volume prune. This commit adds initial support to the HTTP API, both libpod and compat. It enables further work on that issue, such as adding cli support in the future. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | Merge pull request #10610 from cdoern/healthCheckOpenShift Merge Robot2021-06-23
|\ \ | |/ |/| Edited compat handling code for containers/json status and added python tests
| * Health Check is not handled in the compat LibpodToContainerJSONcdoern2021-06-23
| | | | | | | | | | | | | | | | Added parsing and handling for the healthCheck status within containers.go. Also modified tests fixes #10457 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Scrub podman commands to use report packageJhon Honce2021-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor podman commands that have drifted from using c/common report pkg. Report pkg is needed to implement go template functions. Removed obsolete code from podman which exists in c/common. Latest template library added default newlines and method to remove them. Incorporated needed changes in c/common PR below. Depends on https://github.com/containers/common/pull/624 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1855983 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #10622 from cdoern/imgImportFeatureOpenShift Merge Robot2021-06-15
|\ \ | | | | | | compat import imageFromSrc support for platform query parameter
| * | Image import fromSrc now supports OS/Archcdoern2021-06-14
| |/ | | | | | | | | | | | | | | added handling in entities and compat to support passing a specified OS/Arch while importing from SRC. fixes #10566 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* / Fall back to string for dockerfile parameterAlex Schultz2021-06-11
|/ | | | | | | | | | | a9cb824981db3fee6b8445b29e513c89e9b9b00b changed the expectations of the dockerfile parameter to be json data however it's a string. In order to support both, let's attempt json and fall back to a string if the json parsing fails. Closes #10660 Signed-off-by: Alex Schultz <aschultz@redhat.com>
* [CI:DOCS] Update swagger for inspect networkJhon Honce2021-06-08
| | | | | | | | struct for swagger was pointing to wrong internal type Fixes #10559 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #10603 from cdoern/networksQueryCharlie Doern2021-06-08
|\ | | | | implemented verbose and scope as possible
| * fixed docs and schemascdoern2021-06-08
| | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #10548 from cdoern/imgFeatureOpenShift Merge Robot2021-06-08
|\ \ | | | | | | API images/create added missing parameters platform, message, repo
| * | made requested changes, fixed api testscdoern2021-06-04
| | | | | | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | | Merge pull request #10591 from mheon/fix_10569OpenShift Merge Robot2021-06-08
|\ \ \ | |_|/ |/| | Fix compat create with NetworkMode=default
| * | Fix compat create with NetworkMode=defaultMatthew Heon2021-06-07
| |/ | | | | | | | | | | | | | | | | | | | | The rework of namespace handling for rootless CNI broke this, as CNI networks were being computed incorrectly. Fix handling of CNI networks for the Compat Create REST API for containers, and add a test so we don't regress again. Fixes #10569 Signed-off-by: Matthew Heon <mheon@redhat.com>
* / remote: always send resize before the container startsPaul Holzinger2021-06-04
|/ | | | | | | | | | | | | There is race condition in the remote client attach logic. Because the resize api call was handled in an extra goroutine the container was started before the resize call happend. To fix this we have to call resize in the same goroutine as attach. When the first resize is done start a goroutine to listen on SIGWINCH in the background and resize again if the signal is received. Fixes #9859 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* added tests in python rest apicdoern2021-06-01
| | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* Match swagger to "as built" outputJhon Honce2021-05-21
| | | | | | | | | | | * Remove all Types no longer referenced, they were never used A future API breaking version of Podman API, may restore these Types and push formatting into presentation layer vs. server. Fixes #9578 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* fix: response body of containers wait endpointMatej Vasek2021-05-18
| | | | | | | The `Error` part of response must be nil (or omitted) if no error occurred. Before this commit a zero value for the struct was returned. Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Break up python APIv2 testsJhon Honce2021-05-18
| | | | | | | | | | | | | | * Tests broken up into areas of concern * Introduced fixtures to reduce duplicated code * Introduced new assert methods with APITestCase * General cleanup of code while visiting * Tests now targeting quay.io Known issues: * is-official against quay.io not working Fixes: #9238 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #10271 from matejvasek/fix-wait-next-exitOpenShift Merge Robot2021-05-10
|\ | | | | fix: improved "containers/{name}/wait" endpoint
| * fix: improved "containers/{name}/wait" endpointMatej Vasek2021-05-10
| | | | | | | | | | | | | | | | Using event API to detect changes to container instead of polling. Polling was unreliable, sometime change of a state might have been missed. Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | fix: use UTC Time Stamps in response JSONMatej Vasek2021-05-10
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | fix: compat API "images/get" for multiple imagesMatej Vasek2021-05-07
|/ | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix per review requestMatej Vasek2021-05-06
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix pre review requestMatej Vasek2021-05-06
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: docker APIv2 `images/get`Matej Vasek2021-05-05
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* migrate Podman to containers/common/libimageValentin Rothberg2021-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate the Podman code base over to `common/libimage` which replaces `libpod/image` and a lot of glue code entirely. Note that I tried to leave bread crumbs for changed tests. Miscellaneous changes: * Some errors yield different messages which required to alter some tests. * I fixed some pre-existing issues in the code. Others were marked as `//TODO`s to prevent the PR from exploding. * The `NamesHistory` of an image is returned as is from the storage. Previously, we did some filtering which I think is undesirable. Instead we should return the data as stored in the storage. * Touched handlers use the ABI interfaces where possible. * Local image resolution: previously Podman would match "foo" on "myfoo". This behaviour has been changed and Podman will now only match on repository boundaries such that "foo" would match "my/foo" but not "myfoo". I consider the old behaviour to be a bug, at the very least an exotic corner case. * Futhermore, "foo:none" does *not* resolve to a local image "foo" without tag anymore. It's a hill I am (almost) willing to die on. * `image prune` prints the IDs of pruned images. Previously, in some cases, the names were printed instead. The API clearly states ID, so we should stick to it. * Compat endpoint image removal with _force_ deletes the entire not only the specified tag. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* compat api: Networks must be empty instead of nullPaul Holzinger2021-05-04
| | | | | | | | | The compat endpoint for container inspect must return {} instead of null for NetworkSettings.Networks. Fixes #9837 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Allow docker volume create API to pass without nameDaniel J Walsh2021-04-27
| | | | | | | | | The Docker API does not require Volume name to be specified when creating a volume. Fixes: https://github.com/containers/podman/issues/9803 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix images prune filter untilJakub Guzik2021-04-26
| | | | | | | This commits fixes until filter. It is now checking if the created timestamp is before until filter value as expected in the docs. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* Fixes from make codespellDaniel J Walsh2021-04-21
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* [CI:DOCS] Correct status code for /pods/createJhon Honce2021-04-12
| | | | | | | | | | Swagger documentation reported that the API endpoint /pods/create returned 200 while the as-built code returned 201. 201 is more correct so documentation updated. Tests already checked for 201 so no updated needed. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Update manifest API endpointsJhon Honce2021-04-09
| | | | | | | | | | | | * Add validation for manifest name * Always return an array for manifests even if empty * Add missing return in df handler when returning error. Caused an additional null to be written to client crashing python decoder. When c/image is refactored to include manifests, manifest endpoints should be revisited. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #9971 from jwhonce/wip/dfOpenShift Merge Robot2021-04-08
|\ | | | | Add missing return
| * Add missing returnJhon Honce2021-04-08
| | | | | | | | | | | | | | libpod df handler missing a return after writing error to client. This caused a null to be appended to JSON and crashed python decoder. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Volumes prune endpoint should use only prune filtersJakub Guzik2021-04-07
|/ | | | | | | | | Volumes endpoints for HTTP compat and libpod APIs allowed usage of list HTTP endpoint filter funcs. Documentation in case of compat API does not allow that. This commit aligns code with the documentation and also ligns libpod with compat API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* Http api tests for network prune with until filterJakub Guzik2021-04-04
| | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* Merge pull request #9892 from jwhonce/wip/topOpenShift Merge Robot2021-03-30
|\ | | | | Trim white space from /top endpoint results
| * Trim white space from /top endpoint resultsJhon Honce2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | | Versions of the ps command have additional spaces between fields, this manifests as the container asking to run "top" and API reporting "top " as a process. Endpoint and tests updated to check that "top" is reported. There is no libpod specialized endpoint to update. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #9863 from jmguzik/fix-prune-filter-funcsOpenShift Merge Robot2021-03-30
|\ \ | |/ |/| Containers prune endpoint should use only prune filters
| * Containers prune endpoint should use only prune filtersJakub Guzik2021-03-30
| | | | | | | | | | | | | | | | Containers endpoints for HTTP compad and libpod APIs allowed usage of list HTTP endpoint filter funcs. Documentation in case of libpod and compat API does not allow that. This commit aligns code with the documentation. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | APIv2 basic test: relax APIVersion checkEd Santiago2021-03-29
| | | | | | | | | | | | | | | | It is tedious and error-prone to update the 'APIVersion=<exact>' test every time there's a minor bump. Change the test so it confirms only the major version. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #9795 from mheon/bump_320_devOpenShift Merge Robot2021-03-29
|\ \ | |/ |/| Bump to v3.2.0-dev
| * Bump to v3.2.0-devMatthew Heon2021-03-29
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #9822 from jmguzik/fix-pods-list-filters-http-apiOpenShift Merge Robot2021-03-27
|\ \ | | | | | | Fix list pods filter handling in libpod api
| * | Fix list pods filter handling in libpod apiJakub Guzik2021-03-26
| |/ | | | | | | Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>