github.com/sams1990/dockerrepo@v17.12.1-ce-rc2+incompatible/hack/validate/deprecate-integration-cli (about)

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