diff options
author | Ed Santiago <santiago@redhat.com> | 2020-02-24 09:47:13 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-02-25 06:42:27 -0700 |
commit | f25c595cb8af5d6fe491d6974f206d6a5db552cb (patch) | |
tree | 874616fc318e5f6a5820d287d17fe4c12ec0a823 /test/apiv2/01-basic.at | |
parent | afd5cbff1e147bdad200b47fb2bd0992684c7fd4 (diff) | |
download | podman-f25c595cb8af5d6fe491d6974f206d6a5db552cb.tar.gz podman-f25c595cb8af5d6fe491d6974f206d6a5db552cb.tar.bz2 podman-f25c595cb8af5d6fe491d6974f206d6a5db552cb.zip |
apiv2 tests: add more pod tests, timing check
Looks like /libpod/pods/create has been fixed to return an
actual pod ID. Extend those tests.
Also, update timeout in the server command: it's now seconds,
not milliseconds.
Also, update FIXME comments in /pods/prune . Still doesn't
work, but clarify what we're seeing.
Also, add a new test that runs ten /info requests and
barfs if it takes more than 5 seconds.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/apiv2/01-basic.at')
-rw-r--r-- | test/apiv2/01-basic.at | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/apiv2/01-basic.at b/test/apiv2/01-basic.at index a54063260..b8a049cdf 100644 --- a/test/apiv2/01-basic.at +++ b/test/apiv2/01-basic.at @@ -47,4 +47,19 @@ t GET info 200 \ .DefaultRuntime=runc \ .MemTotal~[0-9]\\+ +# Timing: make sure server stays responsive +t0=$SECONDS +for i in $(seq 1 10); do + # FIXME: someday: refactor t(), separate out the 'curl' logic so we + # can call it directly. Then we won't get ten annoying 'ok' lines. + t GET info 200 +done +t1=$SECONDS +delta_t=$((t1 - t2)) +if [ $delta_t -le 5 ]; then + _show_ok 1 "Time for ten /info requests ($delta_t seconds) <= 5s" +else + _show_ok 0 "Time for ten /info requests" "<= 5 seconds" "$delta_t seconds" +fi + # vim: filetype=sh |