QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 9s
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 21s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 24s
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 14s
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 39s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 6s
Use the existing Docker PostgreSQL fixture instead of the removed MySQL caller. Regenerate the packed resource and preserve all source identity and coverage gates. Orb validation and all 56 generator regressions pass on Linux. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Codex <noreply@openai.com> Signed-off-by: James Maes <james@kof22.com>
Calculate Version Script Test Suite
This directory contains comprehensive tests for the calculate_version.sh script.
Test Files
test_calculate_version.sh- Main test suite with comprehensive test casesrun_tests.sh- Test runner with different output modesREADME.md- This documentation
Running Tests
Quick Test Run
./tests/run_tests.sh
Verbose Test Run
./tests/run_tests.sh --verbose
CI Mode (minimal output)
./tests/run_tests.sh --ci
Direct Test Suite
./tests/test_calculate_version.sh
./tests/test_calculate_version.sh --verbose
Test Coverage
The test suite covers:
Branch Types
- Main Branch: Tests stable version handling, tag detection, RC conversion
- Develop Branch: Tests SNAPSHOT version management, release detection
- Release Branch: Tests RC version creation and incrementing
- Hotfix Branch: Tests patch version bumping
- Feature Branch: Tests version inheritance
Edge Cases
- Invalid branch formats
- Unknown branch types
- Missing tags on main branch
- Various version formats (stable, SNAPSHOT, RC)
Version Parsing
- Standard versions:
1.0.0 - SNAPSHOT versions:
1.0.0-SNAPSHOT - RC versions:
1.0.0-RC.1,1.0.0-RC.10 - Multi-digit versions:
10.20.30
Test Environment
The test suite:
- Creates a temporary test directory
- Initializes a test git repository
- Creates test pom.xml files with different versions
- Creates test branches and tags
- Runs the calculate_version.sh script
- Validates the output
- Cleans up test data
Integration with Make
The tests are integrated into the Makefile and can be run with:
make test-scripts
Test Results
The test suite provides:
- ✅ Pass/fail status for each test
- 📊 Summary statistics
- 🔍 Detailed output in verbose mode
- 🚫 Clean exit codes for CI integration
Adding New Tests
To add new test cases:
- Add a new test function in
test_calculate_version.sh - Call
run_testwith appropriate parameters:run_test "Test Name" "branch_name" "current_version" "expected_version" "tag_name" - Add the test function to the main execution flow
- Update this README if needed
Troubleshooting
Common Issues
-
Permission denied: Make sure test scripts are executable
chmod +x tests/*.sh -
Git not found: Ensure git is installed and available in PATH
-
Test failures: Run with
--verboseto see detailed output./tests/run_tests.sh --verbose
Debug Mode
For debugging, you can run individual test functions by modifying the main function in test_calculate_version.sh to call only specific test functions.