github.com/afbjorklund/moby@v20.10.5+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/*_api_*.go' 'integration-cli/*_cli_*.go' \
     9  		| grep -E '^\+func (.*) Test' || true
    10  )
    11  
    12  if [ -n "$new_tests" ]; then
    13  	{
    14  		echo "The following new tests were added to integration-cli:"
    15  		echo
    16  		echo "$new_tests"
    17  		echo
    18  		echo "integration-cli is deprecated. Please add an API integration test to"
    19  		echo "./integration/COMPONENT/. See ./TESTING.md for more details."
    20  		echo
    21  	} >&2
    22  	false
    23  else
    24  	echo 'Congratulations!  No new tests were added to integration-cli.'
    25  fi