File: deprecate-integration-cli

package info (click to toggle)
docker.io 26.1.5%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,576 kB
  • sloc: sh: 5,748; makefile: 912; ansic: 664; asm: 228; python: 162
file content (25 lines) | stat: -rwxr-xr-x 715 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
# Check that no new tests are being added to integration-cli

SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPTDIR}/.validate"

new_tests=$(
	validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_api_*.go' 'integration-cli/*_cli_*.go' \
		| grep -E '^\+func (.*) Test' || true
)

if [ -n "$new_tests" ]; then
	{
		echo "The following new tests were added to integration-cli:"
		echo
		echo "$new_tests"
		echo
		echo "integration-cli is deprecated. Please add an API integration test to"
		echo "./integration/COMPONENT/. See ./TESTING.md for more details."
		echo
	} >&2
	false
else
	echo 'Congratulations!  No new tests were added to integration-cli.'
fi