From d77740f686c90861198498ac760f0bb8a5bcc593 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 10 Sep 2024 15:16:37 +0800
Subject: [PATCH 139/149] only use the openeuler mirror registry in ci

Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
 CI/make-and-install.sh                                | 4 ++--
 CI/test_cases/container_cases/exec_additional_gids.sh | 3 ++-
 CI/test_cases/container_cases/runc_exec.sh            | 2 +-
 CI/test_cases/image_cases/image_digest.sh             | 2 +-
 CI/test_cases/image_cases/image_load.sh               | 8 +++++---
 CI/test_cases/image_cases/image_tag.sh                | 2 +-
 CI/test_cases/image_cases/images_list.sh              | 2 +-
 CI/test_cases/image_cases/integration_check.sh        | 2 +-
 CI/test_cases/manual_cases/oom_monitor.sh             | 4 ++--
 CI/test_cases/manual_cases/security_selinux.sh        | 6 +++---
 10 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh
index 1498d700..09a68da6 100755
--- a/CI/make-and-install.sh
+++ b/CI/make-and-install.sh
@@ -95,7 +95,7 @@ cmake -DLIB_INSTALL_DIR=${restbuilddir}/lib -DCMAKE_INSTALL_PREFIX=${restbuilddi
 make -j $(nproc)
 make install
 sed -i 's/"log-driver": "stdout"/"log-driver": "file"/g' ${restbuilddir}/etc/isulad/daemon.json
-sed -i "/registry-mirrors/a\        \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${restbuilddir}/etc/isulad/daemon.json
+sed -i "/registry-mirrors/a\        \"https://hub.oepkgs.net\"" ${restbuilddir}/etc/isulad/daemon.json
 
 #build grpc version
 cd $ISULAD_COPY_PATH
@@ -109,4 +109,4 @@ else
 fi
 make -j $(nproc)
 make install
-sed -i "/registry-mirrors/a\        \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${builddir}/etc/isulad/daemon.json
+sed -i "/registry-mirrors/a\        \"https://hub.oepkgs.net\"" ${builddir}/etc/isulad/daemon.json
\ No newline at end of file
diff --git a/CI/test_cases/container_cases/exec_additional_gids.sh b/CI/test_cases/container_cases/exec_additional_gids.sh
index a62ab78c..a5eaf652 100755
--- a/CI/test_cases/container_cases/exec_additional_gids.sh
+++ b/CI/test_cases/container_cases/exec_additional_gids.sh
@@ -38,13 +38,14 @@ function additional_gids_test()
 {
     local ret=0
     local runtime=$1
+    local ubuntu_image="isulad/ubuntu"
     test="exec additional gids test => test_exec_additional_gids => $runtime"
 
     msg_info "${test} starting..."
 
     isula rm -f `isula ps -a -q`
 
-    isula run -tid --runtime $runtime -n $cont_name ubuntu bash
+    isula run -tid --runtime $runtime -n $cont_name ${ubuntu_image} bash
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container" && ((ret++))
 
     isula exec $cont_name bash -c "groupadd --gid $USER_GID $USERNAME \
diff --git a/CI/test_cases/container_cases/runc_exec.sh b/CI/test_cases/container_cases/runc_exec.sh
index aa7020ee..32553694 100755
--- a/CI/test_cases/container_cases/runc_exec.sh
+++ b/CI/test_cases/container_cases/runc_exec.sh
@@ -26,7 +26,7 @@ test="exec_runc_test => (${FUNCNAME[@]})"
 function exec_runc_test()
 {
     local ret=0
-    local image="ubuntu"
+    local image="isulad/ubuntu"
     local container_name="test_busybox"
 
     isula pull ${image}
diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh
index ec1cbaa5..5036239a 100755
--- a/CI/test_cases/image_cases/image_digest.sh
+++ b/CI/test_cases/image_cases/image_digest.sh
@@ -26,7 +26,7 @@ function test_image_with_digest()
 {
   local ret=0
   local image="hub.oepkgs.net/library/busybox"
-  local image2="ubuntu"
+  local image2="isulad/ubuntu"
   local image_digest="hub.oepkgs.net/library/busybox@sha256:6066ca124f8c2686b7ae71aa1d6583b28c6dc3df3bdc386f2c89b92162c597d9"
   local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})"
 
diff --git a/CI/test_cases/image_cases/image_load.sh b/CI/test_cases/image_cases/image_load.sh
index d50b3203..8a6c256a 100755
--- a/CI/test_cases/image_cases/image_load.sh
+++ b/CI/test_cases/image_cases/image_load.sh
@@ -28,6 +28,7 @@ function test_image_load()
 {
   local ret=0
   local test="isula load image test => (${FUNCNAME[@]})"
+  local ubuntu_image="isulad/ubuntu"
 
   msg_info "${test} starting..."
 
@@ -61,7 +62,7 @@ function test_image_load()
   isula load -i $mult_image
   [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - load image failed: ${mult_image}" && ((ret++))
 
-  ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu`
+  ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}`
   [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - fail to inspect image: ubuntu" && ((ret++))
 
   busybox_id=`isula inspect -f '{{.image.id}}' busybox`
@@ -83,11 +84,12 @@ function test_concurrent_load()
 {
   local ret=0
   local test="isula load image test => (${FUNCNAME[@]})"
+  local ubuntu_image="isulad/ubuntu"
 
   msg_info "${test} starting..."
 
   # clean exist image
-  ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu`
+  ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}`
   busybox_id=`isula inspect -f '{{.image.id}}' busybox`
   isula rmi $ubuntu_id $busybox_id
 
@@ -105,7 +107,7 @@ function test_concurrent_load()
 
   tail -n 50 /var/lib/isulad/isulad.log
 
-  ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu`
+  ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}`
   [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - fail to inspect image: ubuntu" && ((ret++))
 
   top_layer_id=$(isula inspect -f '{{.image.top_layer}}' ${ubuntu_id})
diff --git a/CI/test_cases/image_cases/image_tag.sh b/CI/test_cases/image_cases/image_tag.sh
index 551d8249..0b8dd3e8 100755
--- a/CI/test_cases/image_cases/image_tag.sh
+++ b/CI/test_cases/image_cases/image_tag.sh
@@ -23,7 +23,7 @@ declare -r curr_path=$(dirname $(readlink -f "$0"))
 source ../helpers.sh
 
 image_busybox="busybox"
-image_hello="hello-world"
+image_hello="isulad/hello-world"
 
 function test_tag_image()
 {
diff --git a/CI/test_cases/image_cases/images_list.sh b/CI/test_cases/image_cases/images_list.sh
index 56cde5b6..a192a75c 100755
--- a/CI/test_cases/image_cases/images_list.sh
+++ b/CI/test_cases/image_cases/images_list.sh
@@ -25,7 +25,7 @@ source ../helpers.sh
 function test_image_list()
 {
   local ret=0
-  local image="hello-world"
+  local image="isulad/hello-world"
   local image_busybox="busybox"
   local INVALID_IMAGE="k~k"
   local test="list images info test => (${FUNCNAME[@]})"
diff --git a/CI/test_cases/image_cases/integration_check.sh b/CI/test_cases/image_cases/integration_check.sh
index f340348d..6a55706c 100755
--- a/CI/test_cases/image_cases/integration_check.sh
+++ b/CI/test_cases/image_cases/integration_check.sh
@@ -27,7 +27,7 @@ image="busybox"
 function test_image_info()
 {
   local ret=0
-  local uimage="nats"
+  local uimage="isulad/nats"
   local test="list && inspect image info test => (${FUNCNAME[@]})"
   local lid
   local cid
diff --git a/CI/test_cases/manual_cases/oom_monitor.sh b/CI/test_cases/manual_cases/oom_monitor.sh
index a1c2503d..8e991cc8 100755
--- a/CI/test_cases/manual_cases/oom_monitor.sh
+++ b/CI/test_cases/manual_cases/oom_monitor.sh
@@ -26,7 +26,7 @@ test_data_path=$(realpath $curr_path/test_data)
 function test_oom_monitor()
 {
     local ret=0
-    local ubuntu_image="ubuntu"
+    local ubuntu_image="isulad/ubuntu"
     local test="container oom monitor test => (${FUNCNAME[@]})"
     containername="oommonitor"
 
@@ -35,7 +35,7 @@ function test_oom_monitor()
     isula pull ${ubuntu_image}
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${ubuntu_image}" && return ${FAILURE}
 
-    isula images | grep ubuntu
+    isula images | grep ${ubuntu_image}
     [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - missing list image: ${ubuntu_image}" && ((ret++))
 
     # use more than 10m memory limit, otherwise it might fail to run
diff --git a/CI/test_cases/manual_cases/security_selinux.sh b/CI/test_cases/manual_cases/security_selinux.sh
index c558befe..cf94c809 100755
--- a/CI/test_cases/manual_cases/security_selinux.sh
+++ b/CI/test_cases/manual_cases/security_selinux.sh
@@ -87,7 +87,7 @@ function daemon_disable_selinux()
 function test_isulad_selinux_file_label()
 {
   local ret=0
-  local image="centos"
+  local image="isulad/centos"
   local test="isulad selinux file label test => (${FUNCNAME[@]})"
 
   msg_info "${test} starting..."
@@ -144,7 +144,7 @@ function test_isulad_selinux_file_label()
 function test_isulad_selinux_process_label()
 {
   local ret=0
-  local image="centos"
+  local image="isulad/centos"
   local test="isulad selinux process label test => (${FUNCNAME[@]})"
 
   msg_info "${test} starting..."
@@ -172,7 +172,7 @@ function test_isulad_selinux_process_label()
 function test_isulad_selinux_mount_mode()
 {
   local ret=0
-  local image="centos"
+  local image="isulad/centos"
   local test="isulad selinux mount mode test => (${FUNCNAME[@]})"
 
   msg_info "${test} starting..."
-- 
2.25.1

