39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
|
|
From 55ffef15be755f2e5fbf78ec6b5b4a6e7be9b690 Mon Sep 17 00:00:00 2001
|
||
|
|
From: WangFengTu <wangfengtu@huawei.com>
|
||
|
|
Date: Sat, 27 Feb 2021 11:23:53 +0800
|
||
|
|
Subject: [PATCH 050/104] add testcase for --pull option
|
||
|
|
|
||
|
|
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
|
||
|
|
---
|
||
|
|
CI/test_cases/image_cases/registry.sh | 14 ++++++++++++++
|
||
|
|
1 file changed, 14 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh
|
||
|
|
index 4e6adc28..c0a0db05 100755
|
||
|
|
--- a/CI/test_cases/image_cases/registry.sh
|
||
|
|
+++ b/CI/test_cases/image_cases/registry.sh
|
||
|
|
@@ -60,6 +60,20 @@ function isula_pull()
|
||
|
|
isula inspect busybox
|
||
|
|
fn_check_eq "$?" "0" "isula inspect busybox"
|
||
|
|
|
||
|
|
+ # test --pull always option
|
||
|
|
+ isula run --rm -ti --pull always busybox echo hello 2>&1 | grep pulling
|
||
|
|
+ [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull always failed" && ((ret++))
|
||
|
|
+
|
||
|
|
+ # test --pull never option
|
||
|
|
+ isula rm -f `isula ps -a -q`
|
||
|
|
+ isula rmi busybox
|
||
|
|
+ isula run --rm -ti --pull never busybox echo hello
|
||
|
|
+ [[ $? -eq 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull never failed" && ((ret++))
|
||
|
|
+
|
||
|
|
+ # test default --pull option (missing)
|
||
|
|
+ isula run --rm -ti busybox echo hello 2>&1 | grep pulling
|
||
|
|
+ [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull missing failed" && ((ret++))
|
||
|
|
+
|
||
|
|
isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox
|
||
|
|
fn_check_eq "$?" "0" "isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox"
|
||
|
|
|
||
|
|
--
|
||
|
|
2.25.1
|
||
|
|
|