diff options
author | Ed Santiago <santiago@redhat.com> | 2021-12-14 08:41:26 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-12-14 12:10:19 -0700 |
commit | 0a2eb7b1857907f065a48a07a9a3096fa3cc5f77 (patch) | |
tree | e84b116a2af32c9d7dbd94a525e0751cad11e493 /test/apiv2/README.md | |
parent | a0894b5ecd6c64d30b82a7b79bc1e2e87c7f0a4e (diff) | |
download | podman-0a2eb7b1857907f065a48a07a9a3096fa3cc5f77.tar.gz podman-0a2eb7b1857907f065a48a07a9a3096fa3cc5f77.tar.bz2 podman-0a2eb7b1857907f065a48a07a9a3096fa3cc5f77.zip |
apiv2 tests: refactor complicated curls
Some months ago, apiv2 tests got added that needed new
functionality: passing a tarball to the remote server.
There was no mechanism to do so in the 't' helper, so
these tests used complicated (and actually not-really-
working) curl commands.
This PR introduces and documents a new usage of 't', in
which passing an argument ending in '.tar' adds the
right magic syntax (--data-binary @PATH) to the existing
curl. This lets us use all standard 't' checks, making
for simpler tests and in the process fixing some bugs.
Also: drive-by fix of a typo bug in the networks test.
Also: set CONTAINERS_REGISTRIES_CONF when starting server
and when running direct podman, to avoid docker.io throttling.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/apiv2/README.md')
-rw-r--r-- | test/apiv2/README.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/apiv2/README.md b/test/apiv2/README.md index 19727cec7..63d1f5b13 100644 --- a/test/apiv2/README.md +++ b/test/apiv2/README.md @@ -60,6 +60,12 @@ of POST parameters in the form 'key=value', separated by spaces: t POST myentrypoint name=$name badparam='["foo","bar"]' 500 ! etc... `t` will convert the param list to JSON form for passing to the server. A numeric status code terminates processing of POST parameters. +** As a special case, when one POST argument is a string ending in `.tar`, +`t` will invoke `curl` with `--data-binary @PATH` and +set `Content-type: application/x-tar`. This is useful for `build` endpoints. +(To override `Content-type`, simply pass along an extra string argument +matching `application/*`): + t POST myentrypoint /mytmpdir/myfile.tar application/foo 400 * The final arguments are one or more expected string results. If an argument starts with a dot, `t` will invoke `jq` on the output to |