Skip to content

Commit

Permalink
allow smoke test to pass (#356)
Browse files Browse the repository at this point in the history
Signed-off-by: ted chang <[email protected]>
  • Loading branch information
tedhtchang authored Nov 8, 2024
1 parent 21d43de commit a652c60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Deploy the operator with kustomize
run: |
kubectl create namespace system
kustomize build config/base | kubectl apply -f -
kustomize build config/base | kubectl apply -n system -f -
- name: Run smoke tests
run: ./tests/smoke/test_smoke.sh
Expand Down
16 changes: 12 additions & 4 deletions tests/smoke/test_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ PVC_NAME="trustyai-service-pvc"
SERVICE_NAME_1="trustyai-service"
SERVICE_NAME_2="trustyai-service-tls"

# Apply the CRD
kubectl create namespace "$NAMESPACE"
kubectl apply -f "$CRD_PATH" -n "$NAMESPACE"

log_success() {
local message=$1
echo "$message"
Expand All @@ -39,6 +35,18 @@ check_resource() {
fi
}

gen_cert() {
openssl req -x509 -nodes -newkey rsa:2048 -keyout tls.key -days 365 -out tls.crt -subj '/CN=trustyai-service-tls'
oc create secret generic trustyai-service-internal --from-file=./tls.crt --from-file=./tls.key -n "$NAMESPACE"
oc create secret generic trustyai-service-tls --from-file=./tls.crt --from-file=./tls.key -n "$NAMESPACE"
rm tls.key tls.crt
}

# Apply the CRD
kubectl create namespace "$NAMESPACE"
gen_cert
kubectl apply -f "$CRD_PATH" -n "$NAMESPACE"

sleep 10

# Check for the creation of services
Expand Down

0 comments on commit a652c60

Please sign in to comment.