Skip to content

Commit

Permalink
tests branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Lee authored and Philip Lee committed Apr 7, 2024
1 parent 76e8be7 commit 6518b96
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ jobs:
chmod +x ./scripts/install.sh
./scripts/install.sh
- name: apply resources and verify
run: |
kubectl config view -o yaml
# we might need to set KUBECONFIG here as well
# - name: apply resources and verify
# run: |

# chmod +x ./scripts/set-env-vars.sh
# . ./scripts/set-env-vars.sh

chmod +x ./scripts/set-env-vars.sh
. ./scripts/set-env-vars.sh
# echo $NAMESPACE
# chmod +x ./scripts/verify.sh
# ./scripts/verify.sh

echo $NAMESPACE
chmod +x ./scripts/verify.sh
./scripts/verify.sh
# now I want to use both kuttl and terratest to validate the tests
# so I probably need the following
# in the tests dir -> split it out
# need a script to run the tests
# probably needs an image as well - unless we can install on ubuntu
5 changes: 5 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ sudo chown runner $HOME/.kube/config
sudo chmod go-r $HOME/.kube/config
kubectl version

# install kuttl
curl -SSL "https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kuttl_0.15.0_linux_x86_64.tar.gz" | tar -xz -C /usr/local/bin

kubectl kuttl version

5 changes: 4 additions & 1 deletion scripts/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ kubectl get ns
kustomize build . | envsubst '$NAMESPACE' | kubectl apply -f-

kubectl get ns
kubectl get pods -n $NAMESPACE
kubectl get pods -n $NAMESPACE

# need to invoke the tests here
# also wait for resources to come up
Empty file added tests/README.md
Empty file.

0 comments on commit 6518b96

Please sign in to comment.