# Self-Upgrade Integration Tests

This directory contains integration tests for verifying the `truss upgrade` functionality
across different installation methods using Docker containers.

## Environments Tested

- **uv**: Tests `uv tool install` and `uv pip install` methods
- **pipx**: Tests `pipx install` method
- **conda**: Tests installation in a conda environment

## Running the Tests

```bash
cd truss/tests/cli/integration_upgrade
./run_tests.sh
```

## What's Tested

1. **Installation detection**: Verifies `detect_installation_method()` returns the correct method
2. **Upgrade command**: Verifies the correct upgrade command is generated
3. **Settings integration**: Tests with `check_for_updates` enabled and disabled
4. **Actual upgrade**: Performs a real upgrade from 0.12.6rc503 to latest

## Notes

- Uses truss==0.12.6rc503 as the baseline version (first version with upgrade logic)
- Tests both settings file configurations (check_for_updates: true/false)
- Containers are ephemeral and cleaned up after tests

