ops-jrz1/tests/Makefile
Dan bc81b4ec15 Rename learner to dev across codebase
- scripts/learner-*.sh → scripts/dev-*.sh
- docs/learner-*.md → docs/dev-*.md
- tests/test-learner-env.sh → tests/test-dev-env.sh
- Update all internal references

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 10:42:34 -08:00

56 lines
1.7 KiB
Makefile

# Integration tests for dev 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 "Dev Environment Integration Tests"
@echo ""
@echo "Usage: make -C tests <target> [USER=username]"
@echo ""
@echo "Targets:"
@echo " env - Test dev 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-dev-env.sh $(USER)
slack-bolt:
@echo "Testing slack-bolt on server as $(USER)..."
@ssh $(USER)@$(SERVER) 'source /etc/slack-dev.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'