Skip to content

Commit

Permalink
Remove fileserver check from prod_cluster test and add prod_cluster_w…
Browse files Browse the repository at this point in the history
…ith_smb test (#50)

* removing fileserver from prod

* adding prod cluster with smb test

* adding execute permissions
  • Loading branch information
bigtallcampbell authored Jun 26, 2024
1 parent 5b59e18 commit ddb9555
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ echo "Running prod_cluster.sh"
${WORKING_DIR}/tests/prod_cluster.sh
echo "prod_cluster.sh successfully passed"

echo "Running prod_cluster_with_smb.sh"
${WORKING_DIR}/tests/prod_cluster_with_smb.sh
echo "prod_cluster_with_smb.sh successfully passed"

echo ""
echo ""
echo ""
Expand Down
1 change: 0 additions & 1 deletion tests/prod_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if [[ ! -f "${KUBECONFIG}" ]]; then
fi

kubectl get deployment/coresvc-registry -n coresvc
kubectl get deployment/coresvc-fileserver -n coresvc
kubectl get deployment/coresvc-switchboard -n coresvc

kubectl get deployment/hostsvc-link -n hostsvc
Expand Down
55 changes: 55 additions & 0 deletions tests/prod_cluster_with_smb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
#
# Deploys and tests the cluster in it's production configuration
#

# Example Usage:
#
# "bash ./tests/prod_cluster.sh"
set -e
SCRIPT_NAME=$(basename "$0")
WORKING_DIR="$(git rev-parse --show-toplevel)"

echo "Microsoft Azure Orbital Space SDK - Production Cluster Test"

if [[ -d "/var/spacedev" ]]; then
echo "Resetting enviornment with big_red_button.sh"
/var/spacedev/scripts/big_red_button.sh
fi

echo "Creating /var/spacedev directory..."
${WORKING_DIR}/.vscode/copy_to_spacedev.sh


echo "Staging Microsoft Azure Orbital Space SDK..."
/var/spacedev/scripts/stage_spacefx.sh --smb

echo "Deploying Microsoft Azure Orbital Space SDK..."
/var/spacedev/scripts/deploy_spacefx.sh

echo "Checking cluster..."
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
if [[ ! -f "${KUBECONFIG}" ]]; then
echo "KUBECONFIG '${KUBECONFIG}' not found. Cluster did not initialize."
exit 1
fi

kubectl get deployment/coresvc-registry -n coresvc
kubectl get deployment/coresvc-fileserver -n coresvc
kubectl get deployment/coresvc-switchboard -n coresvc

kubectl get deployment/hostsvc-link -n hostsvc
kubectl get deployment/hostsvc-sensor -n hostsvc
kubectl get deployment/hostsvc-logging -n hostsvc
kubectl get deployment/hostsvc-position -n hostsvc


kubectl get deployment/platform-deployment -n platformsvc
kubectl get deployment/platform-mts -n platformsvc

echo ""
echo ""
echo ""
echo "-------------------------------"
echo "${SCRIPT_NAME} - Test successful"
set +e

0 comments on commit ddb9555

Please sign in to comment.