# Integration tests for dev dev environment # Run from repo root: make -C tests 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 [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'