diff --git a/tests/bats/run_container_with_rafs_and_compile_linux.bats b/tests/bats/run_container_with_rafs_and_compile_linux.bats index 95bdceaf1b2..6a43434595a 100644 --- a/tests/bats/run_container_with_rafs_and_compile_linux.bats +++ b/tests/bats/run_container_with_rafs_and_compile_linux.bats @@ -1,15 +1,22 @@ load "${BATS_TEST_DIRNAME}/common_tests.sh" setup() { - nydus_rafs_image="ghcr.io/dragonflyoss/image-service/bldlinux:v0.1-rafs-v6-lz4" + nydus_rafs_image="docker.io/openanolis/bldlinux:v0.1-rafs-v6-lz4" + nydus_rafs_image_bak="ghcr.io/dragonflyoss/image-service/bldlinux:v0.1-rafs-v6-lz4" run_nydus_snapshotter config_containerd_for_nydus ctr images ls | grep -q "${nydus_rafs_image}" && ctr images rm $nydus_rafs_image - ctr-remote images rpull $nydus_rafs_image + nerdctl pull --snapshotter=nydus $nydus_rafs_image + ctr images ls | grep -q "${nydus_rafs_image_bak}" && ctr images rm $nydus_rafs_image_bak + nerdctl pull --snapshotter=nydus $nydus_rafs_image_bak } @test "run container with rafs and compile linux" { nerdctl run --rm --net=host --snapshotter=nydus $nydus_rafs_image /bin/bash -c 'cd /linux-5.10.87; make defconfig; make -j8' + if [ $? -ne 0 ]; then + nydus_rafs_image=${nydus_rafs_image_bak} + nerdctl run --rm --net=host --snapshotter=nydus $nydus_rafs_image /bin/bash -c 'cd /linux-5.10.87; make defconfig; make -j8' + fi echo "drop cache and compile linux in container again" echo 3 > /proc/sys/vm/drop_caches nerdctl run --rm --net=host --snapshotter=nydus $nydus_rafs_image /bin/bash -c 'cd /linux-5.10.87; make defconfig; make -j8'