forked from moby/moby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate we're not using the old testing stuff
Signed-off-by: Doug Davis <[email protected]>
- Loading branch information
Doug Davis
committed
Apr 23, 2015
1 parent
3c9ae03
commit ecccfa8
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ echo | |
DEFAULT_BUNDLES=( | ||
validate-dco | ||
validate-gofmt | ||
validate-test | ||
validate-toml | ||
validate-vet | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Make sure we're not using gos' Testing package any more in integration-cli | ||
|
||
source "${MAKEDIR}/.validate" | ||
|
||
IFS=$'\n' | ||
files=( $(validate_diff --diff-filter=ACMR --name-only -- 'integration-cli/*.go' || true) ) | ||
unset IFS | ||
|
||
badFiles=() | ||
for f in "${files[@]}"; do | ||
# skip check_test.go since it *does* use the testing package | ||
if [ "$f" = "integration-cli/check_test.go" ]; then | ||
continue | ||
fi | ||
|
||
# we use "git show" here to validate that what's committed is formatted | ||
if git show "$VALIDATE_HEAD:$f" | grep -q testing.T; then | ||
badFiles+=( "$f" ) | ||
fi | ||
done | ||
|
||
if [ ${#badFiles[@]} -eq 0 ]; then | ||
echo 'Congratulations! No testing.T found.' | ||
else | ||
{ | ||
echo "These files use the wrong testing infrastructure:" | ||
for f in "${badFiles[@]}"; do | ||
echo " - $f" | ||
done | ||
echo | ||
} >&2 | ||
false | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters