iSulad/0006-CI-add-testcases-use-host-rootfs.patch
haozi007 812fa9d606 sync openeuler
1. fix bugs
2. improve testcase

Signed-off-by: haozi007 <liuhao27@huawei.com>
2020-06-28 17:07:11 +08:00

45 lines
1.4 KiB
Diff

From bb9fd6c70af00857af1e7cbfa14ccf31e2cbc1e5 Mon Sep 17 00:00:00 2001
From: lifeng68 <lifeng68@huawei.com>
Date: Wed, 24 Jun 2020 17:25:50 +0800
Subject: [PATCH 6/6] CI: add testcases use host rootfs /
Signed-off-by: lifeng68 <lifeng68@huawei.com>
---
CI/test_cases/basic_cases/run.bash | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/CI/test_cases/basic_cases/run.bash b/CI/test_cases/basic_cases/run.bash
index 9b57c2e6..8db3f1ee 100755
--- a/CI/test_cases/basic_cases/run.bash
+++ b/CI/test_cases/basic_cases/run.bash
@@ -50,7 +50,7 @@ function do_test_t()
echo AA > /tmp/test_run_env
- isula run --name $containername -itd -e AA=BB -e AA --env-file /tmp/test_run_env busybox
+ isula run --name $containername -itd -e AAA=BB -e BAA --env-file /tmp/test_run_env busybox
fn_check_eq "$?" "0" "run failed"
testcontainer $containername running
@@ -61,6 +61,17 @@ function do_test_t()
isula rm $containername
fn_check_eq "$?" "0" "rm failed"
+ isula run --name $containername -itd --external-rootfs / --read-only none sh
+ fn_check_eq "$?" "0" "run container with host rootfs failed"
+ testcontainer $containername running
+
+ isula stop -t 0 $containername
+ fn_check_eq "$?" "0" "stop failed"
+ testcontainer $containername exited
+
+ isula rm $containername
+ fn_check_eq "$?" "0" "rm failed"
+
return $TC_RET_T
}
--
2.25.1