This directory contains tests specific to application deployment and configuration validation.
Tests in this directory focus on:
- Application configuration validation (Docker Compose, environment files)
- Application directory structure verification
- Deployment script validation
- Service configuration testing (Grafana, monitoring configs)
These tests validate application components without performing actual deployment. They are static validation tests that ensure:
- Configuration files are syntactically correct
- Required files and directories exist
- Scripts have proper permissions
- Service configurations are valid
test-unit-application.sh- Main application validation test suite
- Docker Compose Validation - Ensures
compose.yamlis valid - Configuration Validation - Checks
.envtemplates and config files - Structure Validation - Verifies application directory structure
- Script Validation - Checks deployment scripts exist and are executable
- Service Configuration - Validates Grafana dashboards and other service configs
# Run all application tests
./test-unit-application.sh
# Run specific test categories
./test-unit-application.sh docker # Docker Compose only
./test-unit-application.sh config # Configuration only
./test-unit-application.sh structure # Structure only
./test-unit-application.sh scripts # Scripts only
./test-unit-application.sh grafana # Grafana config only✅ Application layer tests:
- Docker Compose file validation
- Application configuration files (
.env, service configs) - Application deployment scripts
- Service-specific configurations (Grafana, Prometheus configs)
- Application directory structure
❌ Infrastructure tests (belong in infrastructure/tests/):
- Terraform/OpenTofu configurations
- Cloud-init templates
- Infrastructure provisioning scripts
- VM-level configurations
❌ Project-wide tests (belong in tests/ at project root):
- Root-level Makefile
- Project structure spanning multiple layers
- Tool availability checks
- Cross-cutting documentation
This test suite is part of a three-layer testing architecture:
- Infrastructure Tests (
infrastructure/tests/) - Infrastructure provisioning - Application Tests (
application/tests/) - Application deployment (this directory) - Project Tests (
tests/) - Cross-cutting project validation
Each layer focuses on its specific concerns and can be run independently.
When adding new application tests:
- Categorize correctly - Ensure the test belongs to the application layer
- Follow naming conventions - Use
test_function_name()format - Add to main suite - Include in
run_application_tests()function - Update help - Add command options if needed
- Document purpose - Explain what the test validates
test_new_application_feature() {
log_info "Testing new application feature..."
local failed=0
# Test implementation here
if [[ ${failed} -eq 0 ]]; then
log_success "New application feature validation passed"
fi
return ${failed}
}