Skip to content

Commit

Permalink
update ginkgo test
Browse files Browse the repository at this point in the history
  • Loading branch information
heliubj18 committed May 27, 2024
1 parent 82da170 commit 9952e9d
Showing 1 changed file with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ then
fi

# restore external oidc cache dir for oc
if [[ -r "$SHARED_DIR/oc-oidc-token" ]] && [[ -r "$SHARED_DIR/oc-oidc-token-filename" ]]; then
echo "Restoring external OIDC cache dir for oc"
export KUBECACHEDIR
KUBECACHEDIR="/tmp/output/oc-oidc"
token_cache_dir="$KUBECACHEDIR/oc"
mkdir -p "$token_cache_dir"
cat "$SHARED_DIR/oc-oidc-token" > "$token_cache_dir/$(cat "$SHARED_DIR/oc-oidc-token-filename")"
oc whoami
fi
#if [[ -r "$SHARED_DIR/oc-oidc-token" ]] && [[ -r "$SHARED_DIR/oc-oidc-token-filename" ]]; then
# echo "Restoring external OIDC cache dir for oc"
# export KUBECACHEDIR
# KUBECACHEDIR="/tmp/output/oc-oidc"
# token_cache_dir="$KUBECACHEDIR/oc"
# mkdir -p "$token_cache_dir"
# cat "$SHARED_DIR/oc-oidc-token" > "$token_cache_dir/$(cat "$SHARED_DIR/oc-oidc-token-filename")"
# oc whoami
#fi

# although we set this env var, but it does not exist if the CLUSTER_TYPE is not gcp.
# so, currently some cases need to access gcp service whether the cluster_type is gcp or not
Expand Down Expand Up @@ -89,6 +89,16 @@ then
source "${SHARED_DIR}/proxy-conf.sh"
fi

if [[ -r "$SHARED_DIR/oc-oidc-token" ]] && [[ -r "$SHARED_DIR/oc-oidc-token-filename" ]]; then
echo "Restoring external OIDC cache dir for oc"
export KUBECACHEDIR
KUBECACHEDIR="/tmp/output/oc-oidc"
token_cache_dir="$KUBECACHEDIR/oc"
mkdir -p "$token_cache_dir"
cat "$SHARED_DIR/oc-oidc-token" > "$token_cache_dir/$(cat "$SHARED_DIR/oc-oidc-token-filename")"
oc whoami
fi

#setup bastion
if test -f "${SHARED_DIR}/bastion_public_address"
then
Expand Down

0 comments on commit 9952e9d

Please sign in to comment.