| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | # Check that no new tests are being added to integration-cli |
| 3 | |
| 4 | SCRIPTDIR="$(cd "$(dirnamescip-shell system . . dirname. "${BASH_SOURCE[0]}")" && pwdscip-shell system . . pwd.)" |
| 5 | source "${SCRIPTDIR}/.validate" |
| 6 | |
| 7 | new_tests=$( |
| 8 | validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_api_*.go' 'integration-cli/*_cli_*.go' \ |
| 9 | | grep -E '^\+func (.*) Test' || true |
| 10 | ) |
| 11 | |
| 12 | if [scip-shell system . . `[`. -n "$new_tests" ]; then |
| 13 | { |
| 14 | echoscip-shell system . . echo. "::error::The following new tests were added to integration-cli:" |
| 15 | echoscip-shell system . . echo. |
| 16 | echoscip-shell system . . echo. "$new_tests" |
| 17 | echoscip-shell system . . echo. |
| 18 | echoscip-shell system . . echo. "integration-cli is deprecated. Please add an API integration test to" |
| 19 | echoscip-shell system . . echo. "./integration/COMPONENT/. See ./TESTING.md for more details." |
| 20 | echoscip-shell system . . echo. |
| 21 | } >&2 |
| 22 | else |
| 23 | echoscip-shell system . . echo. 'Congratulations! No new tests were added to integration-cli.' |
| 24 | fi |