Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: zwwhdls <[email protected]>
  • Loading branch information
zwwhdls committed Oct 31, 2023
1 parent b7b7d3c commit 96a0687
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/scripts/e2e-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
test_dynamic_pvc_delete_not_last_with_path_pattern,
test_webhook_two_volume,
test_dynamic_expand,
test_multi_pvc
test_multi_pvc,
)
from util import die, mount_on_host, umount, clean_juicefs_volume, deploy_secret_and_sc, check_do_test

Expand Down Expand Up @@ -166,8 +166,6 @@

elif test_mode == "process":
test_static_delete_policy()
test_deployment_dynamic_patch_pv()
test_deployment_static_patch_pv()
test_static_cache_clean_upon_umount()
test_dynamic_cache_clean_upon_umount()
test_deployment_using_storage_rw()
Expand Down
14 changes: 11 additions & 3 deletions .github/scripts/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from config import KUBE_SYSTEM, IS_CE, RESOURCE_PREFIX, \
SECRET_NAME, STORAGECLASS_NAME, GLOBAL_MOUNTPOINT, \
LOG, PVs, META_URL, MOUNT_MODE
LOG, PVs, META_URL, MOUNT_MODE, STORAGECLASS_ENCRYPT_NAME, ENCRYPT_GLOBAL_MOUNTPOINT
from model import PVC, PV, Pod, StorageClass, Deployment, Job
from util import check_mount_point, wait_dir_empty, wait_dir_not_empty, \
get_only_mount_pod_name, get_mount_pods, check_pod_ready, check_mount_pod_refs, gen_random_string, get_vol_uuid, \
Expand Down Expand Up @@ -895,7 +895,11 @@ def test_static_cache_clean_upon_umount():
uuid = SECRET_NAME
if IS_CE:
if not by_process:
mount_pod_name = get_only_mount_pod_name(volume_id)
unique_id = volume_id
test_mode = os.getenv("TEST_MODE")
if test_mode == "pod-mount-share":
unique_id = STORAGECLASS_NAME
mount_pod_name = get_only_mount_pod_name(unique_id)
mount_pod = client.CoreV1Api().read_namespaced_pod(name=mount_pod_name, namespace=KUBE_SYSTEM)
annotations = mount_pod.metadata.annotations
if annotations is None or annotations.get("juicefs-uuid") is None:
Expand Down Expand Up @@ -974,7 +978,11 @@ def test_dynamic_cache_clean_upon_umount():
uuid = SECRET_NAME
if IS_CE:
if not by_process:
mount_pod_name = get_only_mount_pod_name(volume_id)
unique_id = volume_id
test_mode = os.getenv("TEST_MODE")
if test_mode == "pod-mount-share":
unique_id = STORAGECLASS_NAME
mount_pod_name = get_only_mount_pod_name(unique_id)
mount_pod = client.CoreV1Api().read_namespaced_pod(name=mount_pod_name, namespace=KUBE_SYSTEM)
annotations = mount_pod.metadata.annotations
if annotations is None or annotations.get("juicefs-uuid") is None:
Expand Down

0 comments on commit 96a0687

Please sign in to comment.