From 5aef160c5a3829c6ccfe64c15407267d42f4edb1 Mon Sep 17 00:00:00 2001 From: Wang Long Date: Thu, 20 Oct 2016 11:21:23 +0800 Subject: [PATCH] add test cases for list command This patch add test `-q` option for list command. Signed-off-by: Wang Long --- tests/integration/list.bats | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration/list.bats b/tests/integration/list.bats index 73ca77ac2..41c9e10db 100644 --- a/tests/integration/list.bats +++ b/tests/integration/list.bats @@ -38,6 +38,12 @@ function teardown() { [[ "${lines[2]}" == *"test_box2"*[0-9]*"running"*$BUSYBOX_BUNDLE*[0-9]* ]] [[ "${lines[3]}" == *"test_box3"*[0-9]*"running"*$BUSYBOX_BUNDLE*[0-9]* ]] + ROOT=$HELLO_BUNDLE runc list -q + [ "$status" -eq 0 ] + [[ "${lines[0]}" == "test_box1" ]] + [[ "${lines[1]}" == "test_box2" ]] + [[ "${lines[2]}" == "test_box3" ]] + ROOT=$HELLO_BUNDLE runc list --format table [ "$status" -eq 0 ] [[ ${lines[0]} =~ ID\ +PID\ +STATUS\ +BUNDLE\ +CREATED+ ]]