Skip to content

Commit

Permalink
Update CI to use the latest staging api service to run tests against.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadling committed Oct 1, 2024
1 parent 8ad5563 commit 041769b
Show file tree
Hide file tree
Showing 5 changed files with 452 additions and 62 deletions.
8 changes: 4 additions & 4 deletions client/python/cryoet_data_portal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export BACKEND_DIR=/tmp/cryoet-data-portal-backend-test-infra
.PHONY: set-api-version
set-api-version:
if [ ! -e $(BACKEND_DIR) ]; then git clone [email protected]:chanzuckerberg/cryoet-data-portal-backend.git $(BACKEND_DIR); fi
export STAGING_SHA=$$(python3 tests/test_infra/get_deployment.sh staging); \
if [ -z $STAGING_SHA ]; then \
export STAGING_SHA=$$(./tests/test_infra/get_deployment.sh staging); \
if [ -n "$${STAGING_SHA}" ]; then \
echo "Setting backend to SHA: $${STAGING_SHA}"; \
cd $(BACKEND_DIR); \
git fetch; \
Expand All @@ -32,7 +32,7 @@ coverage:
export AWS_REGION=us-west-2; \
export AWS_ACCESS_KEY_ID=test; \
export AWS_SECRET_ACCESS_KEY=test; \
export BOTO_ENDPOINT_URL=http://localhost:4000; \
export BOTO_ENDPOINT_URL=http://localhost:5566; \
export BOTO_SIGNATURE_VERSION=s3v4; \
coverage run --parallel-mode -m pytest -v -rP --durations=20 ./tests/

Expand All @@ -41,7 +41,7 @@ test:
export AWS_REGION=us-west-2; \
export AWS_ACCESS_KEY_ID=test; \
export AWS_SECRET_ACCESS_KEY=test; \
export BOTO_ENDPOINT_URL=http://localhost:4000; \
export BOTO_ENDPOINT_URL=http://localhost:5566; \
export BOTO_SIGNATURE_VERSION=s3v4; \
pytest -vvv -s . $(TEST)

Expand Down
56 changes: 0 additions & 56 deletions client/python/cryoet_data_portal/tests/docker-compose.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if [ $1 == 'staging' ]; then
#!/bin/bash
if [ "$1" = 'staging' ]; then
# If there's a release-please branch, this is the file that controls staging versions!
RELEASE_SHA=$(curl -s "https://raw.githubusercontent.com/chanzuckerberg/cryoet-data-portal-backend/refs/heads/release-please--branches--main--components--apiv2/.infra/staging/values.yaml" | grep ' tag:' | head -n 1 | awk '{ print $2; }' | cut -d '-' -f 2)
fi
Expand Down
Loading

0 comments on commit 041769b

Please sign in to comment.