Browse code

Add a validation for integration-cli deprecation.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

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