Skip to content

Commit

Permalink
Fix helm repo update not working
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
  • Loading branch information
marckhouzam committed Jan 1, 2020
1 parent 83fabb3 commit 431667e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions scripts/completion-tests/completionTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ repositories:
url: https://charts2.example.com
EOF
helm repo list
# Fetch the details of the stable repo
helm repo update

# Setup some plugins to allow testing completion of the helm plugin command
# We inject the content of different plugin.yaml files directly to avoid having
Expand Down Expand Up @@ -258,7 +260,7 @@ if [ ! -z ${ROBOT_HELM_V3} ]; then
_completionTests_verifyCompletion "helm show values zztest2" "zztest2/ zztest2file"
_completionTests_verifyCompletion "helm show values zztest2f" ""
_completionTests_verifyCompletion "helm show values stable/yyy" ""
_completionTests_verifyCompletion KFAIL "helm show values stable/z" "stable/zeppelin stable/zetcd"
_completionTests_verifyCompletion "helm show values stable/z" "stable/zeppelin stable/zetcd"
_completionTests_verifyCompletion "helm show values fil" "file:// files"

_completionTests_verifyCompletion "helm show chart zz" "zztest1/ zztest2/ zztest2file"
Expand All @@ -270,15 +272,15 @@ if [ ! -z ${ROBOT_HELM_V3} ]; then

_completionTests_verifyCompletion "helm install name " "./ / zztest1/ zztest2/ stable/ file:// http:// https://"
_completionTests_verifyCompletion "helm install name zz" "zztest1/ zztest2/ zztest2file"
_completionTests_verifyCompletion KFAIL "helm install name stable/z" "stable/zeppelin stable/zetcd"
_completionTests_verifyCompletion "helm install name stable/z" "stable/zeppelin stable/zetcd"

_completionTests_verifyCompletion "helm template name " "./ / zztest1/ zztest2/ stable/ file:// http:// https://"
_completionTests_verifyCompletion "helm template name zz" "zztest1/ zztest2/ zztest2file"
_completionTests_verifyCompletion KFAIL "helm template name stable/z" "stable/zeppelin stable/zetcd"
_completionTests_verifyCompletion "helm template name stable/z" "stable/zeppelin stable/zetcd"

_completionTests_verifyCompletion "helm upgrade release " "./ / zztest1/ zztest2/ stable/ file:// http:// https://"
_completionTests_verifyCompletion "helm upgrade release zz" "zztest1/ zztest2/ zztest2file"
_completionTests_verifyCompletion KFAIL "helm upgrade release stable/z" "stable/zeppelin stable/zetcd"
_completionTests_verifyCompletion "helm upgrade release stable/z" "stable/zeppelin stable/zetcd"

if [ "$SHELL_TYPE" = zsh ]; then
_completionTests_verifyCompletion "helm show values stab" "stable/ stable/."
Expand Down
7 changes: 5 additions & 2 deletions scripts/completion-tests/test-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ BASH4_IMAGE=completion-bash4
echo;echo;
docker build -t ${BASH4_IMAGE} - <<- EOF
FROM bash:4.4
RUN apk update && apk add bash-completion
RUN apk update && apk add bash-completion ca-certificates
EOF
docker run --rm \
-v ${COMP_DIR}:${COMP_DIR} \
Expand All @@ -132,6 +132,7 @@ BASH3_IMAGE=completion-bash3
echo;echo;
docker build -t ${BASH3_IMAGE} - <<- EOF
FROM bash:3.2
RUN apk update && apk add ca-certificates
# For bash 3.2, the bash-completion package required is version 1.3
RUN mkdir /usr/share/bash-completion && \
wget -qO - https://github.com/scop/bash-completion/archive/1.3.tar.gz | \
Expand All @@ -153,6 +154,8 @@ ZSH_IMAGE=completion-zsh
echo;echo;
docker build -t ${ZSH_IMAGE} - <<- EOF
FROM zshusers/zsh:5.7
# This will install the SSL certificates necessary for helm repo update to work
RUN apt-get update && apt-get install -y wget
EOF
docker run --rm \
-v ${COMP_DIR}:${COMP_DIR} \
Expand All @@ -170,7 +173,7 @@ ZSH_IMAGE=completion-zsh-alpine
echo;echo;
docker build -t ${ZSH_IMAGE} - <<- EOF
FROM alpine
RUN apk update && apk add zsh
RUN apk update && apk add zsh ca-certificates
EOF
docker run --rm \
-v ${COMP_DIR}:${COMP_DIR} \
Expand Down

0 comments on commit 431667e

Please sign in to comment.