Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: write integration test log to disk #217

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.lic
assets
logs
reports
14 changes: 9 additions & 5 deletions integration/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ CONNECT_IMAGE ?= rstudio/rstudio-connect
DOCKER_COMPOSE ?= docker compose
PYTHON ?= python3

clean:
rm -rf logs reports
find . -type d -empty -delete

# Run test suite for a specific Connect version.
#
# Matches any version defined in CONNECT_VERSIONS.
Expand Down Expand Up @@ -108,12 +112,11 @@ help:
@echo "Makefile Targets:"
@echo " all (default) Run test suite for all Connect versions."
@echo " latest Run test suite for latest Connect version."
@echo " preview Run test suite for preview Connect version."
@echo " preview Run test suite for preview Connect version."
@echo " <version> Run test suite for the specified Connect version. (e.g., make 2024.05.0)"
@echo " down Tear down Docker resources for all Connect versions."
@echo " down-<version> Tear down Docker resources for specific Connect version (e.g., make down-2024.05.0)."
@echo " up Start Docker Compose for all Connect version."
@echo " up-<version> Start Docker Compose for specific Connect version (e.g., make up-2024.05.0)."
@echo " down Tear down Docker resources for all Connect versions."
@echo " clean Clean up the project directory."
@echo " help Show this help message."
@echo
@echo "Common Usage:"
Expand All @@ -127,4 +130,5 @@ help:
# Typically call from docker-compose.yaml. Assumes Connect server is running
# on local network.
test:
CONNECT_VERSION=${CONNECT_VERSION} CONNECT_API_KEY="$(shell rsconnect bootstrap -i -s http://connect:3939 --raw)" $(PYTHON) -m pytest --junit-xml=./reports/$(CONNECT_VERSION).xml
mkdir -p logs
CONNECT_VERSION=${CONNECT_VERSION} CONNECT_API_KEY="$(shell rsconnect bootstrap -i -s http://connect:3939 --raw)" $(PYTHON) -m pytest --junit-xml=./reports/$(CONNECT_VERSION).xml > ./logs/$(CONNECT_VERSION).log
Loading