deprecate-integration-cli 715 B

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