- test-learner-env.sh: SSH, nix-ld, Slack tokens, Python, API connectivity - test-slack-bolt.py: Socket Mode connection test - Makefile: test runner with env/slack-bolt/vscode targets - Add python3 + uv to system packages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
1.7 KiB
Makefile
56 lines
1.7 KiB
Makefile
# Integration tests for learner dev environment
|
|
# Run from repo root: make -C tests <target>
|
|
|
|
SERVER := 45.77.205.49
|
|
USER := dantest
|
|
|
|
.PHONY: all env slack-bolt vscode help
|
|
|
|
help:
|
|
@echo "Learner Environment Integration Tests"
|
|
@echo ""
|
|
@echo "Usage: make -C tests <target> [USER=username]"
|
|
@echo ""
|
|
@echo "Targets:"
|
|
@echo " env - Test learner environment (SSH, tokens, Python)"
|
|
@echo " slack-bolt - Test slack-bolt Socket Mode connection"
|
|
@echo " vscode - Test VS Code Remote-SSH compatibility"
|
|
@echo " all - Run all tests"
|
|
@echo ""
|
|
@echo "Examples:"
|
|
@echo " make -C tests env"
|
|
@echo " make -C tests env USER=alice"
|
|
@echo " make -C tests all"
|
|
|
|
all: env slack-bolt
|
|
|
|
env:
|
|
@./test-learner-env.sh $(USER)
|
|
|
|
slack-bolt:
|
|
@echo "Testing slack-bolt on server as $(USER)..."
|
|
@ssh $(USER)@$(SERVER) 'source /etc/slack-learner.env && \
|
|
uv pip install --quiet slack-bolt 2>/dev/null && \
|
|
python3 -' < test-slack-bolt.py
|
|
|
|
vscode:
|
|
@echo "Testing VS Code Server binary compatibility..."
|
|
@echo "This test downloads and runs the VS Code Server binary."
|
|
@echo ""
|
|
@ssh $(USER)@$(SERVER) 'set -e; \
|
|
VSCODE_TEST_DIR=$$(mktemp -d); \
|
|
cd $$VSCODE_TEST_DIR; \
|
|
echo "Downloading VS Code Server CLI..."; \
|
|
curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" -o vscode-cli.tar.gz; \
|
|
tar -xzf vscode-cli.tar.gz; \
|
|
echo "Testing binary execution..."; \
|
|
if ./code --version >/dev/null 2>&1; then \
|
|
echo "PASS: VS Code CLI executes (nix-ld working)"; \
|
|
./code --version | head -1; \
|
|
else \
|
|
echo "FAIL: VS Code CLI failed to execute"; \
|
|
echo " nix-ld may not be configured correctly"; \
|
|
exit 1; \
|
|
fi; \
|
|
rm -rf $$VSCODE_TEST_DIR'
|