From 3b7a8c8911ebb720c91c3d19f25509adbf28b444 Mon Sep 17 00:00:00 2001 From: Yiqiao Pu Date: Wed, 3 Jan 2018 22:10:52 +0800 Subject: Update ctr_id for podman_pause test The output from podman run may include some debug information which will make the ctr_id contains unexpect lines. Signed-off-by: Yiqiao Pu Closes: #180 Approved by: mheon --- test/podman_pause.bats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/podman_pause.bats') diff --git a/test/podman_pause.bats b/test/podman_pause.bats index 768ffa53a..1408aa0c6 100644 --- a/test/podman_pause.bats +++ b/test/podman_pause.bats @@ -26,7 +26,7 @@ function teardown() { run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" echo "$output" [ "$status" -eq 0 ] - ctr_id="$output" + ctr_id=`echo "$output" | tail -n 1` run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" echo "$output" [ "$status" -eq 0 ] @@ -43,7 +43,7 @@ function teardown() { run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" echo "$output" [ "$status" -eq 0 ] - ctr_id="$output" + ctr_id=`echo "$output" | tail -n 1` run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" echo "$output" [ "$status" -eq 0 ] @@ -60,7 +60,7 @@ function teardown() { run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" echo "$output" [ "$status" -eq 0 ] - ctr_id="$output" + ctr_id=`echo "$output" | tail -n 1` run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id" echo "$output" [ "$status" -eq 1 ] @@ -74,7 +74,7 @@ function teardown() { run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" echo "$output" [ "$status" -eq 0 ] - ctr_id="$output" + ctr_id=`echo "$output" | tail -n 1` run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" echo "$output" [ "$status" -eq 0 ] @@ -91,7 +91,7 @@ function teardown() { run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" echo "$output" [ "$status" -eq 0 ] - ctr_id="$output" + ctr_id=`echo "$output" | tail -n 1` run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" echo "$output" [ "$status" -eq 0 ] -- cgit v1.2.3-54-g00ecf