From 0cfc2e327da593ba1a3706f48ade363e3d05cc67 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 20 Jan 2021 19:26:33 -0800 Subject: [PATCH] tests/int: rm teardown_running_container_inroot It is only used in a couple of places and is easy to replace with ROOT=xxx teardown_running_container. Signed-off-by: Kir Kolyshkin --- tests/integration/helpers.bash | 4 ---- tests/integration/list.bats | 11 ++++------- tests/integration/root.bats | 5 ++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/integration/helpers.bash b/tests/integration/helpers.bash index 103822146..4b6bc2760 100644 --- a/tests/integration/helpers.bash +++ b/tests/integration/helpers.bash @@ -478,10 +478,6 @@ function teardown_running_container() { __runc delete -f "$1" } -function teardown_running_container_inroot() { - ROOT="$2" __runc delete -f "$1" -} - function teardown_busybox() { cd "$INTEGRATION_ROOT" teardown_recvtty diff --git a/tests/integration/list.bats b/tests/integration/list.bats index 4a6c4f5c9..9cccf5256 100644 --- a/tests/integration/list.bats +++ b/tests/integration/list.bats @@ -3,17 +3,14 @@ load helpers function setup() { - teardown_running_container_inroot test_box1 "$HELLO_BUNDLE" - teardown_running_container_inroot test_box2 "$HELLO_BUNDLE" - teardown_running_container_inroot test_box3 "$HELLO_BUNDLE" - teardown_busybox + teardown setup_busybox } function teardown() { - teardown_running_container_inroot test_box1 "$HELLO_BUNDLE" - teardown_running_container_inroot test_box2 "$HELLO_BUNDLE" - teardown_running_container_inroot test_box3 "$HELLO_BUNDLE" + ROOT="$HELLO_BUNDLE" teardown_running_container test_box1 + ROOT="$HELLO_BUNDLE" teardown_running_container test_box2 + ROOT="$HELLO_BUNDLE" teardown_running_container test_box3 teardown_busybox } diff --git a/tests/integration/root.bats b/tests/integration/root.bats index f3cd3babb..6029a9efb 100644 --- a/tests/integration/root.bats +++ b/tests/integration/root.bats @@ -3,13 +3,12 @@ load helpers function setup() { - teardown_running_container_inroot test_dotbox "$HELLO_BUNDLE" - teardown_busybox + teardown setup_busybox } function teardown() { - teardown_running_container_inroot test_dotbox "$HELLO_BUNDLE" + ROOT="$HELLO_BUNDLE" teardown_running_container test_dotbox teardown_busybox }