Skip to content
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 .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Run unit tests
run: |
source venv/bin/activate
python tests/run_tests.py
pytest

- name: Test Lambda package creation
run: |
Expand Down
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ For any pull request that modifies application code (Python or Terraform), run t
```bash
bandit -r scripts/ lambda/
```
6. **Unit tests** – execute the test suite
6. **Unit tests** – execute the test suite with `pytest`
```bash
python tests/run_tests.py
pytest
```
7. **Integration tests** – when applicable, run integration tests
7. **Integration tests** – when applicable, run tests in the integration folder
```bash
./run_tests.sh
pytest tests/integration
```

### Terraform
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ aws iam tag-user \

```bash
# Run comprehensive test suite
python tests/run_tests.py
pytest

# Run with coverage analysis
coverage run tests/run_tests.py
coverage run -m pytest
coverage report
coverage html # Generate HTML report
```
Expand All @@ -324,7 +324,7 @@ coverage html # Generate HTML report
bandit -r scripts/ lambda/

# Check for hardcoded secrets
python tests/run_tests.py # Includes security checks
pytest -m integration --collect-only # Triggers security fixtures
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: The comment about triggering security fixtures may be misleading.

The '--collect-only' flag does not execute tests or fixtures. Please update the comment to accurately reflect this behavior.

Suggested change
pytest -m integration --collect-only # Triggers security fixtures
pytest -m integration --collect-only # Lists integration tests without executing them or their fixtures

```

### 🏗️ CI/CD Pipeline
Expand Down Expand Up @@ -442,7 +442,7 @@ source venv/bin/activate
pip install -r scripts/requirements.txt

# Run tests before submitting
python tests/run_tests.py
pytest
```

### 📋 Pull Request Process
Expand Down
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pip install -r tests/requirements.txt

# Run tests
echo "Running integration tests..."
pytest tests/integration/test_iam_integration.py -v --cov=scripts --cov-report=term-missing
pytest -m integration -v --cov=scripts --cov-report=term-missing

# Generate HTML coverage report
echo "Generating coverage report..."
coverage html

echo "Tests completed! Coverage report available in htmlcov/index.html"
echo "Tests completed! Coverage report available in htmlcov/index.html"
198 changes: 0 additions & 198 deletions tests/run_tests.py

This file was deleted.

Loading