Skip to content

Commit 61c8662

Browse files
committed
fix: test script
1 parent 3844f2b commit 61c8662

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

admin/azrm.sh

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ export AZCOPY_AUTO_LOGIN_TYPE=AZCLI
33
export AZ_STORAGE_ACCOUNT="${ENV}kernaicluster"
44
export AZ_STORAGE_FILE_SHARE="${ENV}-cluster-cognition"
55

6+
azcopy copy --recursive "https://$AZ_STORAGE_ACCOUNT.file.core.windows.net/$AZ_STORAGE_FILE_SHARE/minio/" "."
67
azcopy rm --recursive "https://$AZ_STORAGE_ACCOUNT.file.core.windows.net/$AZ_STORAGE_FILE_SHARE/caddy/*"
8+
azcopy rm --recursive "https://$AZ_STORAGE_ACCOUNT.file.core.windows.net/$AZ_STORAGE_FILE_SHARE/kratos/*"
9+
azcopy rm --recursive "https://$AZ_STORAGE_ACCOUNT.file.core.windows.net/$AZ_STORAGE_FILE_SHARE/oathkeeper/*"
10+
azcopy rm --recursive "https://$AZ_STORAGE_ACCOUNT.file.core.windows.net/$AZ_STORAGE_FILE_SHARE/cognition-gateway/*"
711

k8s/test.sh

+5
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,17 @@ until kubectl exec -i deployment/test-postgres -- sh -c pg_isready; do
138138
echo "Waiting for postgres to be ready..."
139139
sleep 3
140140
done
141+
kubectl exec -i deployment/test-postgres -- sh -c "psql -U postgres -c 'DROP DATABASE IF EXISTS refinery;"
141142
kubectl exec -i deployment/test-postgres -- sh -c "psql -U postgres -c '$(cat infrastructure/test/deployment/assets/init.sql)'"
142143
echo "::endgroup::"
143144

144145

145146
if [ "$ENABLE_ALEMBIC_MIGRATIONS" = "true" ]; then
146147
upgrade_alembic_migrations
148+
else
149+
kubectl apply --kustomize apps/${KUBERNETES_DEPLOYMENT_NAME}/test
150+
__safe_migration_rollout test-${KUBERNETES_DEPLOYMENT_NAME}
151+
echo "Applied test-${KUBERNETES_DEPLOYMENT_NAME} deployment"
147152
fi
148153

149154
echo "::group::Set test image: ${AZURE_CONTAINER_REGISTRY}/${KUBERNETES_DEPLOYMENT_NAME}:${TEST_IMAGE_TAG}"

0 commit comments

Comments
 (0)